logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Thielen" <d...@thielen.com>
Subject Re: Making the log4j library optional
Date Mon, 01 Apr 2002 22:41:25 GMT
worked - thanks - dave

----- Original Message -----
From: "Ceki Gülcü" <ceki@qos.ch>
To: "Log4J Users List" <log4j-user@jakarta.apache.org>; "Log4J Users List"
Sent: Monday, April 01, 2002 3:03 PM
Subject: Re: Making the log4j library optional


My proposed solution is to introduce a method such
as the following in your library:

void disableWinWardLogging() {

   Category cat = Category.getInstance("net.winward");

   // In log4j 1.2
   // Logger logger = Logger.getLogger("net.winward");
   // logger.setLevel(Level.OFF);

The question is whether your library can call disableWinWardLogging
early in its initialization and how and when the winWardLoggingEnabled
is set.

Please let me know if this approach works for your library.

At 17:30 30.03.2002 -0700, David Thielen wrote:

>----- Original Message -----
>From: "Ceki Gülcü" <ceki@qos.ch>
>To: "Log4J Users List" <log4j-user@jakarta.apache.org>
>Sent: Saturday, March 30, 2002 3:11 AM
>Subject: Re: Making the log4j library optional
> > At 15:36 29.03.2002 -0700, you wrote:
> > >Hi;
> > >
> > >Here's my problem. I'm creating a 3rd party library that people will
> > >for their applications. I need to do no logging and I need to not
> > >log4j when they use my library (first, if I log then I fill up their
> > >with stuff that means nothing to them and second, what if they use an
> > >incompatible version of log4j).
> >
> > First, you would be surprised by the number of libraries that already
> > require log4j. Second, we go to great pains to ensure that all
> > versions of log4j are backward compatible. So I don't understand the
> > comment about incompatible versions of log4j.
>Ok, if it's always going to be backward compatible, then that brings me
>to my earlier question. How can I tell it to write out nothing for all
>packages in my jar - ie net.windward.*[.*[.*[...]]]. Because if someone is
>using my library, I don't want to fill up their logs with a bunch of stuff
>that means nothing to them. I need this for log4j 1.1 (since I can't
>users of my library to switch to 1.2).
>thanks - dave

My link of the month:

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

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

View raw message