We are using Jboss 7.4.0 with two nodes that each have their own rolling file appenders. What we would like to do is redirect these two outputs in a unique file, "outside" both Jboss nodes. I tried to use SocketAppenders, with a manually started Log4J server, but it doesn't work...
<custom-handler name="SOCKET" class="org.apache.log4j.net.SocketAppender" module="org.apache.log4j">
<level name="DEBUG"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p %X{user} %X{app} [%C:%M:%L] (%t) %s%E%n"/>
</formatter>
<properties>
<property name="Port" value="4712"/>
<property name="RemoteHost" value="127.0.0.1"/>
</properties>
The only things in the log4j server is this :
[2015-04-01 10:31:24,969] [main] [Listening on port 4712]
[2015-04-01 10:31:24,981] [main] [Waiting to accept a new client.]
I've read that the SocketAppender doens't exists anymore in Jboss 7+, but to be honest, the Jboss documentation is incomplete, missing, or incorrect at best.
So, what's the correct (or best) way to do this, without reinventing the wheel? Should we use asynchronous rolling file appenders? Is there any other alternatives?