On 21/02/2008, at 11:00 PM, Mikael Ståldal wrote:
I have two appenders, MAIN_LOG and DEBUG_LOG. I have the loggers set
up to match Java class hierarchy as recommended. I have two
interesting codebases, "com.mycompany" and "com.othercompany".
I want to send DEBUG and higher from "com.mycompany" and WARN and
higher from "com.othercompany" to MAIN_LOG. And I want to send DEBUG
and higher from "com.mycompany" and DEBUG and higher from
"com.othercompany" to DEBUG_LOG.
Finally I want to handle stuff outside "com.mycompany" or
"com.othercompany" (such as "org.thirdparty") by sending ERROR and
higher to MAIN_LOG and INFO and higher to DEBUG_LOG.
How do I accomplish that?
If this truly is what you want, then set the logger levels for both
hierarchies to DEBUG, and write yourself a simple custom Filter
implementation that accepts/denies events based on your logic, and
attach a separate configured instance of that filter to each of the
appenders (accepting/denying as the case may be above). You'll need
to use the XML configuration file to do this (or programatic I guess).
cheers,
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]