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 Keith Hatton <kh...@axiomsystems.com> on 2003/02/20 14:25:00 UTC

How to avoid BasicConfigurator?

I tried searching the archives as I'm sure this must have been discussed before but I couldn't find an answer so ...

I am trying to use Log4J in an EJB (specifically, my App Server is Weblogic 6.1 but I don't think that's relevant). I am configuring the logger and its appenders programmatically, and my test log messages are being reported correctly.

However, every message is also being logged to standard output. I've done a bit of diagnosis and discovered that, as well as my own appender, there is a console appender defined at the root level. I presume this has been configured by the BasicConfigurator. But really, I don't want this default behaviour, I just want to control the logging for my own components myself via the Log4J API.

Seems like this should be an FAQ but either it isn't or my brain is on holiday ...

Thanks for any ideas
Keith



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


Re: How to avoid BasicConfigurator?

Posted by Lydia P <ly...@attglobal.net>.
 Ive still not solved that problem that is mentioned in the thread 
below, but had to do some emergency work instead of getting
this finished up - will revisit hopefully next week.


Ceki Gülcü wrote:

>
> Log4j itself does not call BasicConfigurator automatically. However, 
> commons-logging does configure log4j on its own account. Are you using 
> commons-logging or a tool that uses commons-logging, e.g. example struts?
>
> See also the thread "log4j and WSAD 5.0 anomalies and problems":
>
> http://marc.theaimsgroup.com/?t=104497294500002&r=1&w=2
>
> in particular my message:
>
> http://marc.theaimsgroup.com/?l=log4j-user&m=104498017406236&w=2
>
> By the way, we now receive almost daily messages about this problem.
>
> At 13:25 20.02.2003 +0000, you wrote:
>
>> I tried searching the archives as I'm sure this must have been 
>> discussed before but I couldn't find an answer so ...
>>
>> I am trying to use Log4J in an EJB (specifically, my App Server is 
>> Weblogic 6.1 but I don't think that's relevant). I am configuring the 
>> logger and its appenders programmatically, and my test log messages 
>> are being reported correctly.
>>
>> However, every message is also being logged to standard output. I've 
>> done a bit of diagnosis and discovered that, as well as my own 
>> appender, there is a console appender defined at the root level. I 
>> presume this has been configured by the BasicConfigurator. But 
>> really, I don't want this default behaviour, I just want to control 
>> the logging for my own components myself via the Log4J API.
>>
>> Seems like this should be an FAQ but either it isn't or my brain is 
>> on holiday ...
>>
>> Thanks for any ideas
>> Keith
>
>
> Ceki
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>



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


Re: How to avoid BasicConfigurator?

Posted by Ceki Gülcü <ce...@qos.ch>.
Log4j itself does not call BasicConfigurator automatically. However, 
commons-logging does configure log4j on its own account. Are you using 
commons-logging or a tool that uses commons-logging, e.g. example struts?

See also the thread "log4j and WSAD 5.0 anomalies and problems":

http://marc.theaimsgroup.com/?t=104497294500002&r=1&w=2

in particular my message:

http://marc.theaimsgroup.com/?l=log4j-user&m=104498017406236&w=2

By the way, we now receive almost daily messages about this problem.

At 13:25 20.02.2003 +0000, you wrote:
>I tried searching the archives as I'm sure this must have been discussed 
>before but I couldn't find an answer so ...
>
>I am trying to use Log4J in an EJB (specifically, my App Server is 
>Weblogic 6.1 but I don't think that's relevant). I am configuring the 
>logger and its appenders programmatically, and my test log messages are 
>being reported correctly.
>
>However, every message is also being logged to standard output. I've done 
>a bit of diagnosis and discovered that, as well as my own appender, there 
>is a console appender defined at the root level. I presume this has been 
>configured by the BasicConfigurator. But really, I don't want this default 
>behaviour, I just want to control the logging for my own components myself 
>via the Log4J API.
>
>Seems like this should be an FAQ but either it isn't or my brain is on 
>holiday ...
>
>Thanks for any ideas
>Keith

Ceki 


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