Re: [Davmail-users] RFC (request for comment) on new connection logging feature
Brought to you by:
mguessan
|
From: Mickaël G. <mgu...@fr...> - 2017-03-23 22:43:47
|
Le 23/03/2017 à 12:09, Liam Gretton a écrit :
> I recently got round to looking at this new feature, it would be very very useful to me.
>
> Unfortunately I can't get it to work. I checked out the code from SVN today (r2475).
>
> Here are my log4j settings in davmail.conf:
>
>
> # Logging settings
> davmail.logFilePath=/var/log/davmail.log
> log4j.logger.httpclient.wire=WARN
> log4j.logger.org.apache.commons.httpclient=WARN
> log4j.rootLogger=WARN
> log4j.logger.davmail=DEBUG
> log4j.logger.davmail.connection=DEBUG, ConnectionAppender
> log4j.appender.ConnectionAppender=org.apache.log4j.FileAppender
> log4j.appender.ConnectionAppender.file=/tmp/davmailconnection.log
> log4j.appender.ConnectionAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.ConnectionAppender.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c %x - %m%n
>
> The file /tmp/davmailconnection.log is not created automatically, and even if present before starting davmail nothing is written to it during connections. There are no errors reported in the main log file.
>
> Is there something I'm not doing correctly?
=> You have to add the above lines directly in log4j.properties before
build, or create a separate log4j.properties and add its path in DavMail
classpath *before* davmail.jar
I may eventually add an option in .davmail.properties to add the
appender automatically, but this is not yet the case.
Regards,
--
Mickael Guessant
mailto:mgu...@fr...
|