QLog + splinklibrary Logging
QLog is a java application which simply displays log messages. It enables to apply a filter to these messages so you can seek for a specific log or just display log messages which apply to the filter.
Because QLog is in fact a socket server it is also possible to display logs sent from an application which runs on a remote server. (This can be very handy). The greatest feature in my opionion is that messages sent to QLog can be equipped with a color for each kind of message (that is trace,info,debug,warn,error,fatal,...), so the messages look well arranged.

In the whole QLog is a lot like powerflashers superb SocketOutputServer SOS but in contrast to SOS it is platform independent, it also runs on Mac Os X or Linux. (I developed it because i wanted to migrate to Ubuntu and I simply couldnt live without something like SOS)
QLog also integrates very well with the logging framework from splinklibrary. The splinklibrary logging framework comes with various ILogOutput implementations, so you can configure to which output destinations your logs are sent.
splinklibrary supports TraceOutput, FirebugOutput, SosOutput and QLogOutput out of the box. So you dont need to worry about any low level socket implementation details if you use QLog with splinklibrary.
One very useful feature of the sprinklibrary logging system is that if you run your application within the flash debug player, it adds the class- and methodname where the log originated from and if compiled with the -debug=true flag also the line number.
/** The Logger is configured once in a project. Each class which wants to log simply needs to add something like: private static const _logger:ILogger = LoggerProvider.getLogger("default", TheClassName); */ private function configureLogger():void { var factory:ILoggerFactory = new LoggerFactory(); /** It's possible to set various logger factories, so each one needs its own id */ factory.setId("default"); /** Logs within the specified range are sent to the log outputs */ factory.setRange(new LogRange(LogLevel.TRACE, LogLevel.FATAL)); /** DefaultOutputFormatter is used to format the log messages You can easily write and use your own IOutputFormatter */ factory.setOuputFormatter(new DefaultOutputFormatter()); /** Use different output strategies, here QLog and trace splinklibrary offers QLog, SOS, trace and Firebug LogOutput implementations. If you need something else, just implement the ILogOutput interface */ factory.addLogOutput(new QLogOutput()); factory.addLogOutput(new TraceOutput()); LoggerProvider.addLoggerFactory(factory); /** Get a Logger and log something */ _logger = LoggerProvider.getLogger("default", SampleApplicationClass); _logger.log(LogLevel.INFO, "Info"); _logger.log(LogLevel.DEBUG, "Debug"); _logger.log(LogLevel.ERROR, "Error"); }
Of course it should be quite simple to use Qlog with other Logging frameworks, or just to write a simple class to use it. splinklibararys QLogOutput should give a good impression how to do it.
Currently there is a stable QLog standalone version
Thanks to Fabian there is also a Eclipse Plugin version (very alpha) Update site: http://quui.com/update-site/
Here is a simple log4j appender class which enables to use QLog with the apache log4j framework for java.
No Comments
No comments yet.