David Araujo wrote:
Hello,
i would like to use the Chainsaw
(http://logging.apache.org/log4j/docs/chainsaw.html#Tutorial)
application to centralize the logs of multiple james instances. But for
that i have to use the log4j.properties(xml) config file to configure
something like this:
log4j.rootLogger=DEBUG, CHAINSAW_CLIENT
log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
log4j.appender.CHAINSAW_CLIENT.Port=4445
log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
My goal is to send the james logs to a remote log server (Chainsaw).
Does anyone know if it's possible to configure james to use log4j to log?
Using the latest trunk (one of the nighly builds) you should be able to
replace the standard logmanager with a logmanager using log4j:
try replacing:
----
<component role="org.apache.avalon.phoenix.interfaces.LogManager"
class="org.apache.avalon.phoenix.components.logger.DefaultLogManager"
logger="logs"/>
with:
<component role="org.apache.avalon.phoenix.interfaces.LogManager"
class="org.apache.avalon.excalibur.logger.Log4JConfLoggerManager"
logger="logs">
<configuration>...log4jconfiguration...</configuration>
</component>
for customized configuration
or
<component role="org.apache.avalon.phoenix.interfaces.LogManager"
class="org.apache.avalon.excalibur.logger.Log4JLoggerManager"
logger="logs" />
for log4j.properties configuration
----
in the phoenix kernel.xml (Log4JConfLoggerManager) is part of
excalibur-logger-2.1 that is part of latest phoenix.
Please note that I never tested this, let us know if it works!
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]