logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <tmas...@iknowledgeinc.com>
Subject Re: Is log4j already configured?
Date Tue, 08 Jan 2002 19:13:43 GMT
What about creating your own hierarchy of Category objects and Appenders?

This wouldn't interefere with another log4j configuration.  Instantiate the
objects at runtime.

It is possible to turn off indiviual Category objects by changing their
Priority level.


T Master
----- Original Message -----
From: "Chris Jones" <chris@mt.sri.com>
To: <log4j-user@jakarta.apache.org>
Sent: Tuesday, January 08, 2002 11:38 AM
Subject: Is log4j already configured?

I'm writing a library for use with other applications, and I'm using
log4j for my logging.  I'd rather not require the application
developer to initialize log4j, so it would be nice to have my library
run its own configurator.  However, I don't want to stomp on any
configuration that the application developer has already done, if they
happen to be using log4j already.  Alternatively, it would be nice to
offer the ability for the application developer to turn debugging on
(or turn all messages off) for my library.

I think I'm looking for a way to detect if log4j has already been
configured.  If not, I'll just configure it myself, using
BasicConfigurator.

Any pointers?

Chris

--
chris@mt.sri.com -----------------------------------------------------
Chris Jones                                    SRI International, Inc.
www.mt.sri.com                                             www.sri.com



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


Mime
View raw message