You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Sean Casey <sl...@qualcomm.com> on 2004/08/12 18:42:32 UTC

How do I turn off console logging...

Hi,

I am new to log4j, so forgive my possibly stupid question.  I want to have 
my application log to a daily rotating file only, i.e. I don't want 
anything to come to the console, AND I don't want every log message logged 
twice.  I have defined a named logger, and have set its appender to be a 
DailyRollingFileAppender, but I can't figure out how to silence the 
rootLogger, nor can I get the additivity to work, so that I don't get 
duplicate entries.  Can anyone help me?

Thanks,

Sean 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: How do I turn off console logging...

Posted by Sean Casey <sl...@qualcomm.com>.
Please forgive the duplicate post.  I had trouble getting subscribed, and 
several spam filters led me to believe that the message had not been posted.

Yoav, thanks for the hint.  The test program that I am using to figure out 
how this package works is calling BasicConfigurator.configure(), so that 
gives me an area to look at.  Do you have any idea why I can't seem to turn 
"additivity" off?

I have a line in log4j.properties:

log4j.additivity.logger.com.qualcomm=false , where I found a line like this 
in another example, but it doesn't seem to turn off the duplicate logging 
from the root log.  I even tried to set the additivity for the rootLogger 
to false, as another person on this list suggested, but to no avail.

Any help would be appreciated.  Otherwise, this seems like a very nice package.