You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jean-Paul Le Fèvre <J-...@cea.fr> on 2004/09/23 16:29:31 UTC
How to distribute messages in different files ?
I would like to configure the messages issued by my webapps
in Tomcat 5.5. I've been working on the log4j properties a long time but
without success.
My hope is to get 3 logfiles : a general one for Tomcat (say catalina.out)
and one of each of my 2 contexts.
My log4j.properties file looks like :
log4j.rootLogger=INFO, A, R, L
log4j.logger.org.apache.catalina.core.ContainerBase.Catalina.localhost./path1=INFO,R
log4j.logger.org.apache.catalina.core.ContainerBase.Catalina.localhost./path1=INFO,L
...
log4j.appender.A=org.apache.log4j.ConsoleAppender
...
log4j.appender.R.File=/home/lefevre/soft/Tomcat/logs/file1.log
...
log4j.appender.L.File=/home/lefevre/soft/Tomcat/logs/file2.log
...
And I've experimented lot of additivity values but I'm still unable to
separate messages, either they go simultaneously in 2 or 3 files or they are
appended in a single file.
BTW It is not clear from what I've read if additivity has to be set with
log4j.additivity.my.category=true
or
log4j.logger.my.category.additivity=true
Thank you for your help,
--
___________________________________________________________________
Jean-Paul Le Fèvre * Mail : LeFevre@fonteny.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org