The project I am on requires that we get the logging redirected to syslog for jboss. I have successfully managed to configure the log4j-appender in the jboss-logging.xml file and now I have enabled UDP the messages do get forwarded to syslog.
However I cannot control the format of the messages that get generated, the pattern-formatter seems to be completely ignored.
I can set properties to control things directly on the log4j appender, so that I can for instance set facilityPrinting to TRUE. But I need to set the syslog tag.
In normal log4j I can do this using something like:
|<param name="ConversionPattern" value="TAGVALUE: %m%n"/>|
But whatever I specify in the pattern-formatter gets ignored (and so I don't think this is used in the case of log4j appenders). e.g.
|<pattern-formatter pattern="JBOSS: %m%n"/>^M-->|
As the layout is not a simple property of the log4j SysLogAppender I haven't worked out a way of setting it on the log4jappender as a property.
Has anyone resolved this problem?
I wondered if it was related to the applyLayout parameter in the JBoss Log4JAppenderHandler as it seems to not apply formatting to the log4j appenders if this is not true, but I couldn't see how I could specify that value.
I don't have to go via log4j, but I think that is the only way to get JBOSS to write to syslog as it doesn't have its own syslog handler.
Any help much appreciated, I am new to JBOSS, so I might be missing something simple.