Log4Play is a module that provides a log4j appender which publishes log entries to an EventStream.
The module also provides an user interface which uses a WebSocket creating a live stream of log messages.
You can use this user interface to look at the logs of your application without needing to login to the actual box.
If you would like to turn off log4play globally or on a specific mode (production for example) then just define a configuration property ‘log4play.disabled=true’.
Log4Play comes bundled with BetterLogs so you can also turn that off by adding ‘betterlogs.disabled=true’ to your configuration (conf/application.conf).
– play → log4play 0.4
A live demo is available at http://log4play.mashup.fm:9030/
As soon as you enable the module on your application you should have the same UI available as well under /logs.
The source code is available on Github at https://github.com/feliperazeek/log4play.
May 13th 2011 – Version 0.1: First Release.
May 15th 2011 – Version 0.2: Code Cleanup.
May 17th 2011 – Version 0.3: BetterLogs Integration. Firefox 4 Info provided by Diogenes Buarque.
Jun 22nd 2011 – Version 0.4: Adding log4play.disabled configuration option, adding max number of log entries in the UI
Thank you Diogenes Buarque for the following (Boa Diogenes – Valeu!):
“For those who want to use the awesome log4play in firefox 4, you must enable the use of websockets.
For more details regarding the implementation of this module please go to http://geeks.aretotally.in/log4play-log4j-ui-mashed-up-with-play-framework-knockout-js-and-websockets.
Log4Play integrates with BetterLogs module (http://www.playframework.org/modules/betterlogs), great module created by Stephane Godbillon. This is how Stephane defines her creation:
“This very simple module enhances the Play! Framework logs to bring some missing information such as the class name, the method name where the log has been called, its signature, the file name and the line.”
- Extend the UI to listen on multiple WebSockets to allow to receive messages from a whole cluster.
- Play/Pause Functions
- Integrate with module BetterLogs