RE: Barracuda: Log4J Servlet

Kirk Daries <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <D09B591872D1D611AF2B0010B5A1AAD021A1AF@WCSMAIL>
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]]
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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.