Hello,

Have you given the property field in LoggingEvent (available from CVS head) any consideration? This should allow you to add your own field to LoggingEvent without needing to sub-class Logger, etc.

At 10:47 PM 4/16/2004, you wrote:
I don't think this would work in my case. Let me elaborate...

I've customized the NTEventLogAppender.dll by adding a new reportEvent
method which takes a category and an event id so as to expand on the
limited support for windows event log categories and event id's that
comes built in to the NTEventLogAppender.dll and
org.apache.log4j.nt.NTEventLogAppender class.

To take advantage of this new reportEvent method, I've had to create my
own ElmNTEventLogAppender class to call it.  The append method takes a
LoggingEvent, so I have to create derive my own ElmLoggingEvent class to
contain the new nt_category and nt_event_id attributes.  The
LoggingEvent gets created in the forcedLog method of the Logger class.
So that's why I have to derive my own Logger to override the forcedLog
method to create an ElmLoggingEvent object instead of the standard
LoggingEvent object.

-- Ceki G�lc�

For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp




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



Reply via email to