Describe NTEventLogAppender here. Log4j NT Event log setup




============================= Log4j.xml setup - Example

      <appender name="NT_LOG" class="org.apache.log4j.nt.NTEventLogAppender">
          <param name="Source" value="demo"/>
          <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern"
                  value="%-5p-%d{dd MMM yyyy-HH:mm:ss,SSS}-%C.%M:%L)%m%n"/>


DLL Setup Get the .zip file for your version of log4j (i.e. 1.2.17) and download the .zip file (NOT the .jar file)


Open the .zip file and ...

Copy the appropriate dll into the %SystemRoot%\System32 folder

For 64-bit OS %SystemRoot%\System32\NTEventLogAppender.amd64.dll

For 32-bit OS %SystemRoot%\System32\NTEventLogAppender.dll


Regedit setup Create a new “Key” here:


Create a new “String” EventMessageFile = <dll name>

For 64-bit OS EventMessageFile = %SystemRoot%\System32\NTEventLogAppender.amd64.dll

For 32-bit OS EventMessageFile = %SystemRoot%\System32\NTEventLogAppender.dll

Misc. links:



NT Event logger info. [ ]

NTEventLogAppender (last edited 2012-10-25 18:04:36 by AdamHiatt)