| Author |
Multiple appenders in Log4j
|
Senthil Kumar Sekar
Ranch Hand
Joined: Aug 08, 2010
Posts: 43
|
|
I want certain logs(irrespective of log levels) in console and certain others in File.BUT NOT IN BOTH.
Is it possible to implement the same using log4j?
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8212
|
|
Yes, that's possible. Take a look at the log4j manual on the project site. Pay attention to the additive (or was it additivity) attribute on the category/logger element in log4j.xml.
|
[My Blog] [JavaRanch Journal]
|
 |
Senthil Kumar Sekar
Ranch Hand
Joined: Aug 08, 2010
Posts: 43
|
|
|
Thanks Jai. I got it done by having the additive="false" property.
|
 |
 |
|
|
subject: Multiple appenders in Log4j
|
|
|