RE: Barracuda: Log4J Servlet
Kirk Daries <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <D09B591872D1D611AF2B0010B5A1AAD021A337@WCSMAIL> |
Hi Jake, My bad. Misunderstood you when you said 'root' Yes.. the root logger level is set to 'debug'. I'll try making your suggested changes. If it still doesn't work... I'll post to the log4j mailing list. Regards KD -----Original Message----- From: Jacob Kjome [mailto:[email protected]] Sent: 02/December/2002 04:03 To: [email protected] Subject: RE: Barracuda: Log4J Servlet Hi Kirk, But what is your root logger set to? Does it have the level set to "debug"? Try using the following for the definition of the logger in your inner class: private final Logger logger = Logger.getLogger(DBConnectionPoolManager.class.getName().replace( '$', '.' )); I'm still confused about getting the debug messages for that logger? I guess I'll have to wait for the answer to whether your <root> logger has level="debug" set. If none of that works, you are probably going to have to take this question to the experts at the log4j-user list. I'm sure you'll find the answer there. Once you do, let us know what you came up with. Jake At 08:27 AM 12/2/2002 +0200, you wrote: Hi Jake, Adding the 'additivity' attribute has yielded no result. <logger name="sitawc.db.DBConnectionPool"> <level value="warn"/> </logger> <logger name="sitawc.db.DBConnectionPool.DBConnectionPoolManager" additivity="false"> <level value="warn"/> </logger> This is VERY strange. Despite the fact that I've set the logger level to 'warn' for the parent package... Debug messages still show up in the lower level package. For the record I'm using log4j-1.2.6.jar Regards KD -----Original Message----- From: Jacob Kjome [ mailto:[email protected] <mailto:[email protected]> ] Sent: 30/November/2002 09:35 To: [email protected] Subject: Re: Barracuda: Log4J Servlet Hi Kirk, I take it you have a logger for that package or maybe the root logger set to "debug", right? Try adding additivity="false" to your logger. So.... <logger name="sitawc.db.DBConnectionPool.DBConnectionPoolManager" additivity="false"> <level value="warn"/> </logger> Let me know if that works out for you. Jake At 12:56 PM 11/29/2002 +0200, you wrote: Hi Jake, I seem to have a problem controlling the logging level within a inner class. Here's the class and pakage name "sitawc.db.DBConnectionPool.DBConnectionPoolManager" DBConnectionPoolManager is a static inner class (Singleton). Now.... here's the declaration from my log4 config file. <logger name="sitawc.db.DBConnectionPool.DBConnectionPoolManager"> <level value="warn"/> </logger> It seems to ignore this.. and logs debug messages. E.g. DEBUG sitawc.db.DBConnectionPool$DBConnectionPoolManager - bla bla debug message I even tried changing the inner class declaration to: "sitawc.db.DBConnectionPool$DBConnectionPoolManager" But that just gives the following error: log4j:ERROR Parsing error on line 33 and column 67 log4j:ERROR Attribute value "sitawc.db.DBConnectionPool$DBConnectionPoolManager" of type ID must be a name. The funny thing is... If i specify that the entire package should only show warnings..(No debug messages)... E.g. <logger name="sitawc.db.DBConnectionPool"> <level value="warn"/> </logger> The inner class still goes ahead and outputs debug messages? Hmmmmm? Regards KD _______________________________________________ Barracuda mailing list [email protected] http://www.enhydra.org/mailman/listinfo.cgi/barracuda <http://www.enhydra.org/mailman/listinfo.cgi/barracuda> FAQ - http://www.jguru.com/faq/Barracuda <http://www.jguru.com/faq/Barracuda>