logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott.Whitecr...@corp.terralycos.com
Subject RE: Log4J Setup using XML Configuration File
Date Thu, 04 Oct 2001 17:16:38 GMT


The problem I'm encountering with the XML configuration, is that the
minimum threshold seems to get over written.  I get debug messages in the
error log, even though I'm setting the threshold for the error file log to
'error'.  I did a search for xml configuration problems, but didn't see
anything like this mentioned while looking.  Its entirely possible I missed
it though.

You're right about the max threshold though, bad example.  I hadn't thought
it through completely in that case.  I suppose it'd be better said that it
should be possible to send only error/alerts to one file, debug and above
to another, warnings and above to stdout, etc., all for one category.  For
the life of me, I can't get the xml configuration to do this though.  I
find the xml configuration file easier to read/use (and in turn easier for
QA/Ops to adjust) then the other means of setting up log4j (either
hardcoding or the win.ini type of setup file).

Thanks,
Scott



                                                                                         
                                        
                    "Jon Skeet"                                                          
                                        
                    <jon.skeet@pe        To:     "LOG4J Users Mailing List" <log4j-user@jakarta.apache.org>
                      
                    ramon.com>           cc:                                          
                                           
                                         Subject:     RE: Log4J Setup using XML Configuration
File                                
                    10/04/2001                                                           
                                        
                    01:04 PM                                                             
                                        
                    Please                                                               
                                        
                    respond to                                                           
                                        
                    "LOG4J Users                                                         
                                        
                    Mailing List"                                                        
                                        
                                                                                         
                                        
                                                                                         
                                        




> First, a quick question: Its my assumption that each log4j
> category can have muliple appenders.

Yes.

> Each appender for a category can also have its own
> priority.

Well, each appender can have a *threshold*, which is a minimum priority
level.

Search for "threshold" in the mailing list archive for details.

> In theory, this means I can log all debug messages for a
> category to one file, all error messages to another file, and warning
> messages to stdout, if I desire.

No - unfortunately there is no *maximum* threshold, so wherever you get
debug messages, you also get warning messages. That's a bit of a pain,
IMO.

Jon

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






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


Mime
View raw message