james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Charles <e...@apache.org>
Subject Re: [Discuss] Per service logging in server
Date Sun, 02 Jan 2011 12:51:31 GMT
We've got in server log4j.properties
log4j.logger.org.apache.james=INFO, CONS, FILE

I guess we can create all Log with 
LogFactory.getLog("org.apache.james....");
Must this be applied in Main, MailboxCopierImpl,.. class ?

Tks,

Eric

On 2/01/2011 11:13, Eric Charles wrote:
> Hi,
>
> The current logging in server relies on a per-service/bean log4j 
> appender.
> This allows to have log files per service (pop, smtp,...) based on 
> bean names defined in the spring context.
>
> commons-logging is used and depending on the presence of log4j, a 
> Log4JLogger or a Jdk14Logger is instanciated
> http://commons.apache.org/logging/guide.html#Configuration
>
> This approach has proved well, but I've got questions on 2 use cases.
> (PS: From 
> http://wiki.apache.org/commons/Logging/FrequentlyAskedQuestions: "The 
> configuration supported by JCL is limited to choosing the underlying 
> logging system. JCL does not (and will never) support changing the 
> configuration of the wrapped logging system. Please use the mechanisms 
> provided by the underlying logging system.")
>
> 1. How to see the log result in the console when running tests in non 
> server (mailbox, imap,...) test classes.
> -> configure $JAVA_HOME/jre/lib/logging.properties ?
> -> Add log4 as dependency and configure log4j ?
>
> 2. Configure the logging for small components (without having to 
> define a new entry in log4j.properties).
> -> typical component is the mailboxcopier. I don't think it's worth to 
> define a new entry in log4j.properties for each new small component.
> -> maybe have some generic mailbox, imap, protocols appenders in 
> log4j.properties.
>
> Tks,
>
> Eric
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message