logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Weir (Transform Research)" <MW...@TransRes.com>
Subject RE: How to disable a category?
Date Wed, 09 Jan 2002 14:42:25 GMT
This strikes me as odd behavior.  Is this correct:
- Any category that is used in a program, but is not explicity specified in
the config file will inherit from the root category
- There is no way to completely disable a category

If I have some categories that I want to use for, say, debugging, and I want
end-users to be unaware of the categories, how do I do it?  If the
categories are mentioned in the config file, the user will ask questions
that I don't want to answer.  If the categories are not mentioned in the
config file, then all the categories will start printing.

Is the only solution to
1. Load the configuration
2. Take a list of your known categories, and
	a. See whether it Category.exists("CAT")
	b. If it does not exist, create it and set its priority to FATAL.
3. Avoid using FATAL priority in any optional categories otherwise they
can't be switched off.

MW

-----Original Message-----
From: T Master [mailto:tmaster@iknowledgeinc.com]
Sent: Tuesday, January 08, 2002 4:21 PM
To: Log4J Users List
Subject: Re: How to disable a category?


Below are some properties I took note of from a collection of log4j emails.
I've never used the log4j.threshold property.

I have managed to disable ALL logging and restart all though.

        // @see email correspondence: 27th September 2001 in Log4J mailing
list
        // "Subject: Re: Restarting logging after Disabling logging from a
Configuration File"
        // may affect system logging too unfortunately
        log4j.disableOverride = true    //restarts all logging
        log4j.disable = DEBUG
        log4j.enable  = ON  //log4j version 1.2



----- Original Message -----
From: "Mathew, Bindhu" <Bindhu.Mathew@ssa.gov>
To: "'Log4J Users List'" <log4j-user@jakarta.apache.org>
Sent: Tuesday, January 08, 2002 2:08 PM
Subject: RE: How to disable a category?


> what about adding a statement
> log4j.disable=warn or
> log4j.threshold=warn in the property file?? category with level
info(<warn)
> will be disabled.
>
> please correct me if I am wrong.
>
> -----Original Message-----
> From: Michael Weir (Transform Research) [mailto:MWeir@TransRes.com]
> Sent: Tuesday, January 08, 2002 4:06 PM
> To: 'Log4J Users List'
> Subject: How to disable a category?
>
>
> How can I disable a category from inside the config file?
> Thanks,
> Michael Weir
>
> --
> 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>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message