IBM developerWorks has a great article that talks about extending log4J to with Jabber. log4J comes with appenders for Sockets, JMS, SMTP, Telnet and so on… This article discusses extending the AppenderSkeleton class to provide logging to a Jabber server, which initially sounded crazy (why would you want to get IM’ed every time a log() message is fired in your application?), but makes great sense now that I think about it. You can log to a group chat room (multiple people can be viewing the logs in real-time), Jabber clients are ubiquitious across operating system and device type, and Jabber provides resource awareness, which means that the logging messages will be routed to the best resource available.
The authors use Smack by Jive Software for connectivity through Java.
One thought on “Instant logging: Harness the power of log4j with Jabber”
Unfortunately the program doesn’t work with current Jabber protocol. Do you know what should be changed?