Sabino's Lab
Improve yourself...
sabinos.Log -> Example -> sabinos.Log.Appenders.Floating
This exaple shows how to use the sabinos.Log.Appenders.Floating class to log the buttons below click event.
This appender also provides an Javascript code evaluation which can be used to help observng variables states in runtime.
Due to CSS interpretation differences for each browser this appender is displayed incorrectly by IE, but this is a known issue to be fixed in future version, however, the javascript funcionality is completely compatible.
HTML
<input type="button" class="button" value="Trace Log" onclick="floatingLogger.trace('button clicked');" />
<input type="button" class="button" value="Debug Log" onclick="floatingLogger.debug('button clicked');" />
<input type="button" class="button" value="Info Log" onclick="floatingLogger.info('button clicked');" />
<input type="button" class="button" value="Warn Log" onclick="floatingLogger.warn('button clicked');" />
<input type="button" class="button" value="Error Log" onclick="floatingLogger.error('button clicked');" />
<input type="button" class="button" value="Fatal Log" onclick="floatingLogger.fatal('button clicked');" />
Javascript
Event.observe(window, 'load', function(){
//Creates log object
floatingLogger = new sabinos.Log('floatingLogger');
//Adds floating appender to the appender collection
floatingLogger.Appenders.add(
new sabinos.Log.Appenders.Floating('message: {message}<br>time: {time}<br>caller: {caller}<br>level: {level}<br>')
);
});