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
Just wanted to say thanks for the blog post, got me headed in the right direction!
ReplyDeleteAnd where to put log4j-1.2.16.jar ?
ReplyDeleteWhere write this code.
ReplyDeleteI have a error, to start Jboss AS 7