What I mean by channels may be more clear if I use an analogy.  If a
computer represents our main logging stream, then there might be a HD
channel, a monitor channel, a keyboard channel, a NIC channel, etc.  So I'm
beginning to see that I mean by channels are log4j's Categories.  This was
further clear to me in the FAQ which points out that in previous version of
Log4j, the log method took the category as a parameter.  This leaves one
question.  Going back to the computer analogy, how do I turn off a category
if for example I want to completely disable logs from say the keyboard
channel?  Can you turn off a Category or only set it as high as FATAL and
have log methods that are lower than cat.fatal()?  IE as per my other post,
I would like to achieve this:

log4j.category.foo.bar=OFF, utilFile

Thanks,
Craig



                                                                                       
                         
                    "Sam Newman"                                                       
                         
                    <sam.newman@stam       To:     "LOG4J Users Mailing List" 
<[EMAIL PROTECTED]>   
                    plets.com>             cc:     (bcc: Craig Reichenbach/CAM/Lotus)  
                         
                                           Subject:     Re: channels in Log4j          
                         
                    07/27/2001 04:02                                                   
                         
                    AM                                                                 
                         
                    Please respond                                                     
                         
                    to "LOG4J Users                                                    
                         
                    Mailing List"                                                      
                         
                                                                                       
                         
                                                                                       
                         




I am still unsure as to what exactly you mean by channels - its a term I'm
unfamiliar with in a logging context after having used both log4j and Jlog.
Do you mean a channel in as much as being able to determine exactly where a
log message came from, e.g. this DEBUG message came from User X? If so then
log4j can do this - take a look at the NDC class in the API documentation
(http://jakarta.apache.org/log4j/docs/api/index.html). You may also want to
check the FAQ which often seems to be overlooked (often by me!) at
http://jakarta.apache.org/log4j/docs/FAQ.html.

sam
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 8:11 PM
Subject: channels in Log4j


>
> Hi,
>      This is kind of a conceptual question.  I've been asked to look at
3rd
> party loggers, and one main priority is that they have support for
various
> channels.  So I am wondering if and how Log4j uses channels.  In a
previous
> logging system I used, every log method took a String channel argument.
A
> properties file maintained a list of these channels and provided the
> ability to turn them on or off (e.g. "channelX=true" (or false) ).  I'm
> trying to discover how this concept applies to Log4j.
>
> what I mean by channels:
> So  For example, if an Appender such as a RollingFileAppender represents
an
> overal log stream, inside this are several seperate streams representing
> various sources of logging information.  So if you think of the log
levels
> (debug, info, warn, etc) as horizontal control, the channels then
represent
> vertical control.
>
> Is the answer as obvious as "Categories are log4j's version of channels"?
> If so, how would you toggle a Category between on and off ?  Can this be
> done in the log4j.configuration file?
>
> Thank you,
>
> Craig R.



---------------------------------------------------------------------
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