How to write from Java to the Windows Event Log?

Svet picture Svet · Oct 3, 2008 · Viewed 26.8k times · Source

How can I write from Java to the Windows Event Log?

Answer

Lou Franco picture Lou Franco · Oct 3, 2008

Log4J is a Java-based logging utility. The class NTEventLogAppender can be used to "append to the NT event log system". See the documentation here:

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/nt/NTEventLogAppender.html

Edit: There is a newer version, Log4j 2 "that provides significant improvements over its predecessor."