Tuesday, March 5, 2013

Jboss AS 7 Syslog Handler

We recently upgraded our jboss AS to 7.1 and realized that Jboss for some reason had moved from log4j to JUL. We only had to change our jobss-log4j.xml to standalone.xml and most of the logging was unaffected except for Syslogging. Turns out Jboss logging did not have a SyslogHandler neither does JUL. So we decided to implement one for ourselves as is recommended by a number of blog posts. Here is our implementation that simply delegates to log4j SysLogAppender.
1. Download and unzip the module from here org.zip into jboss modules directory
2. Add the following to jboss standalone.xml
3. Restart your jboss to enable Syslogging

The source code can be found here SyslogHandler.java

3 comments:

  1. Just wanted to say thanks for the blog post, got me headed in the right direction!

    ReplyDelete
  2. And where to put log4j-1.2.16.jar ?

    ReplyDelete
  3. Where write this code.

    I have a error, to start Jboss AS 7



    ReplyDelete