Does not require any code changes if your setting the log4j through
properties file.
But you need to include path for NTEventLogAppender.dll in (which is in
org/log4j/nt )the system classpath and some thing like this in properties
file.

log4j.appender.e=org.log4j.nt.NTEventLogAppender
log4j.appender.e.layout=org.log4j.PatternLayout
log4j.appender.e.Threshold=WARN
log4j.appender.e.layout.ConversionPattern=%c{1} %M - %m%n

obviously you need to add "e" in the rootCategory for the above addition in
properties file.

let me know if there is a problem

-srinivas

-----Original Message-----
From: Gary Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 11:36 AM
To: '[EMAIL PROTECTED]'
Subject: How do I set up log4j to log errors to the NT Event Logger


Hello all,

I am very new to log4j and was wondering if someone could tell me what
settings in the log4l.properties file I need to make and any code changes I
may need to make - to get the logged messages to go to the NT Event Viewer?

Thanks,

Gary Graham
[EMAIL PROTECTED]


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

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

Reply via email to