I can't tell you where the console appender's are coming from, but you're
additivity configuration isn't quite right.
I think you want:
log4j.additivity.com.qualcomm=false
instead.
I think you should also add this line to help you out:
log4j.debug=true
which will output the details of the configuration it goes through.
Hope that helps.
Paul Smith
> -----Original Message-----
> From: Sean Casey [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 13, 2004 11:32 AM
> To: Log4J Users List
> Subject: Re: How do I turn off console logging...
>
> Hello,
>
> Sorry to be such a pest, but I have not succeeded in un-confusing
> myself. I am using the following file for log4j.properties:
>
> log4j.rootLogger=DEBUG
> log4j.logger.com.qualcomm=DEBUG,A2
> log4j.additivity.logger.com.qualcomm=false
> log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.A2.File=/tmp/DailyLog.log
> log4j.appender.A2.DatePattern='.'yyyy-MM-dd
> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
> # Print the date in ISO 8601 format
> log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
> # Print only messages of level WARN or above in the package com.foo.
> log4j.logger.com.qualcomm.qdbs=DEBUG
> #log4j.logger.com.qualcomm.qdbs=INFO
>
> My thinking here is to NOT append an appender to the root log, and only a
> file appender to my other log.
>
> My test class looks like:
>
> import org.apache.log4j.Logger;
>
> public class Hello1 {
>
> static Logger logger = Logger.getLogger("com.qualcomm.qdbs");
>
> public
> static
> void main(String argv[]) {
> logger.debug("Hello world.");
> logger.info("What a beautiful day.");
> }
> }
>
> When I run this, I see each message output to my file, ONCE, and output to
> the console TWICE. This indicates to me that I am picking up a
> ConsoleAppender that I don't know about, and that I am not successfully
> setting the "additivity" property.
>
> Does anyone see what I have done wrong? I would really like to make use
> of
> this package, but am about ready to admit defeat.
>
> Sorry for the long message,
>
> Sean Casey
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]