Logging

I

Ilya Lakhmitski

Is there a way do not print to the console the message:

log4j:WARN No appenders could be found for logger?
 
T

Tobi

Is there a way do not print to the console the message:

log4j:WARN No appenders could be found for logger?

It looks like you're using the log4j framework but didn't configured
any appender. Could you provide some more information (e.g. the log4j
configuration)?
 
A

Arne Vajhøj

Is there a way do not print to the console the message:

log4j:WARN No appenders could be found for logger?

If you want log output, then configure log4j properly
(see the log4j docs on how to do that).

If you don't want that, then put this in the top
of your main:

Logger.getRootLogger().addAppender(new NullAppender());

Arne
 
R

Robert Klemme

If you want log output, then configure log4j properly
(see the log4j docs on how to do that).

If you don't want that, then put this in the top
of your main:

Logger.getRootLogger().addAppender(new NullAppender());

Even that can be controlled via configuration. I would prefer that
approach because it leaves the option to enable logging if that should
be necessary.

Kind regards

robert
 
A

Arne Vajhøj

Even that can be controlled via configuration. I would prefer that
approach because it leaves the option to enable logging if that should
be necessary.

There is a point in that.

Arne
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top