log4j help

B

buu

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)
 
J

Jan =?UTF-8?B?VGhvbcOk?=

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
 
K

Kevin Sandal

buu said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top