On 6/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I would like to use only this one logger to log errors and
> info/debug/warn events.
> In addition I would like to have one file (info.log) that contains all
> messages and another file (error.log) that contains ONLY error /fatal
> messages.

If I understand correctly what you want to do (use only one logger in
the code, and have all messages in one file and only error-fatal
messages in the other), what you need to do is put thresholds on your
appenders.

Create one appender that logs to info.log and set its threshold to
INFO (or DEBUG if you want debugging output too), and another one with
ERROR as its treshold. Something like this:

log4j.appender.errorAppender.Threshold=ERROR
log4j.appender.infoAppender.Threshold=INFO

this will make errorAppender discard any message with level below
ERROR, and infoAppender discard any message with level below INFO.

-- 
Javier Gonzalez Nicolini

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to