I'm a newbie in log4j...
I would like to have 2 files for logging.
one for errors, another for information.
how could I make it? every time I start logger, it appends data to both
files (I created 2 loggers and 2 appenders, but it's still the same)
Jan Thomä - 21 Aug 2007 21:45 GMT
Hi,
> I would like to have 2 files for logging.
> one for errors, another for information.
>
> how could I make it? every time I start logger, it appends data to both
> files (I created 2 loggers and 2 appenders, but it's still the same)
It would have helped a great deal if you had added your current log4j
configuration (http://catb.org/~esr/faqs/smart-questions.html#beprecise).
From what i read i assume you have configured the appenders in a wrong way,
but without seeing your configuration there is no way to tell.
Best regards,
Jan

Signature
_________________________________________________________________________
insOMnia - We never sleep...
http://www.insOMnia-hq.de
Kevin Sandal - 21 Aug 2007 21:47 GMT
> I'm a newbie in log4j...
> I would like to have 2 files for logging.
> one for errors, another for information.
>
> how could I make it? every time I start logger, it appends data to both
> files (I created 2 loggers and 2 appenders, but it's still the same)
Providing a snippet, or two, of code would help isolate the issue. That, and
the version you are using. Oh, also the properties file you are using (if
any).
For what it is worth, Log4j caused me untold headaches. To this day I have
an error. Thankfully it does not stop logging--just generates an error at
the top.
Kevin Sandal