Two options that come to mind:
1. Use 2 appenders with only one logging the exception. Then when you
would normally change the level you would change the appender.
2. If it is code that you control you could log the exception at a
lower level (i.e. info) so you don't see them when the threshhold i
AIL PROTECTED]>
>Sent: Mar 20, 2008 5:27 PM
>To: Log4J Users List , [EMAIL PROTECTED]
>Subject: RE: conditional logging of exception
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I dont really understand your thoughts why an error should not be logged along
with stack trace, since it is an exceptional situation which should not occur
often. Errors in logs are never "noise ratio".
But your problem with classname, linenummer etc. can be solved if you use the
overloaded lo