And just one more thing to factor in:

log4j.threshold=........

This property defines the base threshold that ALL log events must be
greater than or equal to before going on and evaluating the
category/logger & appender thresholds that have been discussed.  

This property is like the primary valve in a water pipe system
regulating the main flow in a very very course manor.

By default this top level threshold is "ALL".  But you could set it to,
say, INFO to effectively discard/ignore all DEBUGs in the quickest way
possible. 

Hope that helps.

Paul Smith

On Fri, 2004-04-02 at 14:25, Kawthar Bt M Sulaiman wrote:
> Oh ok.... now I understand.
> 
> Thank you.
> --Kawthar
> 
> >>> [EMAIL PROTECTED] 02/04/2004 12:15:20 PM >>>
> On Fri, 2004-04-02 at 16:01, Kawthar Bt M Sulaiman wrote:
> > Hi,
> > 
> > In this file, there's:
> > 
> > log4j.rootCategory=debug, MO  ----> <first>
> > 
> > Then,
> > 
> > log4j.appender.MO=org.apache.log4j.DailyRollingFileAppender
> > log4j.appender.MO.Threshold=DEBUG. -----> <second>
> > ...
> > 
> > My question, is the debug <on first> and <debug on second> has the
> > same
> > meaning?  So, if I just want to log INFO and above, do I change the 
> > Threashold=INFO only or both?
> 
> When some code logs a message, it specifies a priority and a category.
> If the message priority is less than the category priority, then the
> message is totally ignored.
> 
> Once the message gets past that first cutoff, some significant work
> gets
> done (creating a LogEvent object etc), then the message is sent on to
> each appender (ie "outputter") associated with the category.
> 
> If any of those appenders has a threshold set, then that appender
> discards (ignores) the message if its priority is less than the
> threshold.
> 
> So this allows you to say:
>  * category X has two appenders: file and email
>  * for category X, ignore everything lower than INFO
>  * for the file appender, accept all that pass the category priority
>    (ie no threshold set)
>  * for the email appender, ignore those messages which got past the
>    category filtering, but are lower than WARN
> 
> It is more efficient to filter at the category level than the appender
> level, but if you want different amounts of detail written to different
> 
> appenders for the same category, then the threshold setting allows you
> to do this.
> 
> Cheers,
> 
> Simon
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 
> 
> Confidential information may be contained in this e-mail and any files transmitted 
> with it ('Message'). If you are not the addressee indicated in this Message (or 
> responsible for delivery of this Message to such person), you are hereby notified 
> that any dissemination, distribution, printing or copying of this Message or any 
> part thereof is strictly prohibited. In such a case, you should delete this Message 
> immediately and advise the sender by return e-mail. Opinions, conclusions and other 
> information in this Message that do not relate to the official business of Maxis 
> shall be understood as neither given nor endorsed by Maxis.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to