suppose I have a package com.foo.hello ,

can I define log level and appender such that error logs goes to one file
and all other (even including error, if possible) goes to another file.

I tried as follows, but last one is always overwriting first one

log4j.logger.com.foo.hello=ERROR, FOO_1
log4j.logger.com.foo.hello=DEBUG, FOO_2

and appender as 

log4j.appender.FOO_1=org.apache.log4j.RollingFileAppender
log4j.appender.FOO_1.File=../log/foo_error.log
&
log4j.appender.FOO_2=org.apache.log4j.RollingFileAppender
log4j.appender.FOO_2.File=../log/foo_all.log

Can someone please help me on that?

Thanks a ton
Nitin

-- 
View this message in context: 
http://old.nabble.com/is-it-possible-to-have-different-log-level-for-same-package-tp31638492p31638492.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to