On 20/02/2008, at 11:32 AM, bakermatt wrote:


Ok,

So I got it so that the LoggingEvents get dispatched to my Appender but ALL of the Events get posted there, even the INFO and DEBUG events coming from
the Receiver itself.  How can I isolate the incoming messages from the
messages being generated internally?  Also, I am setting the
LoggerRepository on the receivers to LogManager.getLoggerRepository().
Should I create a new Hierarchy instance to isolate the Receivers from each
other, or should I keep it the way it is?



Just turn down the verbosity of the 'org.apache.log4j' top-level logger as you would any other logger in your log4j configuration, that way your custom appender never receives these events.

Alternatively if the logging events you're really interested in come from your own company code, say 'com.mycompany', you could attach your custom appender that is processing these events to the logical top level logger of interest, thereby bypassing any org.apache.log4j ones.

cheers,

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to