logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marepalli, Somesh" <Somesh.Marepa...@ca.com>
Subject RE: Using log4j for writing a library...
Date Fri, 04 Jun 2004 13:12:20 GMT
Hi:
   Thanks for the reply. In general, I noticed some undesirable effects
of using the default configuration when no configuration file is
provided:

    a) it defaults to debug level when no configuration is done
    b) it emits warning messages to the console
    
   I don't know the intent and purpose for the above, but I am sure
there's some good reason. For my use case, it does not fit the needs. 

   Hence, I am trying to use the approach of using an internal
.properties file used to explicitly configure log4j. But, I would not
like to do this till I am sure users of my library have not configured
log4j.

   I saw the snippet of code to detect if log4j is configured in 
   http://wiki.apache.org/logging-log4j/Log4JProjectPages/UsefulCode
   
   Thanks for the link. Is the code above the only reliable way to
detect if log4j (1.2.8) is configured?

    Have other users tried this approach?

Regards
-Somesh

-----Original Message-----
From: WJCarpenter [mailto:bill-log4j@carpenter.ORG] 
Sent: Friday, June 04, 2004 1:27 AM
To: Log4J Users List
Subject: Re: Using log4j for writing a library...

>> I am writing a Java based library for which I am using the log4j
>> package (version 1.2.8)
>> a) Are there any special things we need to worry about
>> configuration.

Since you are writing a library, you have to be aware of what log4j
does by default if nobody does any configuration at all.  Here a
message thread that discusses it:

http://marc.theaimsgroup.com/?l=log4j-user&m=108326596313116&w=2
-- 
bill@carpenter.ORG (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3


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





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


Mime
View raw message