Differences between revisions 3 and 4
Revision 3 as of 2012-10-25 17:59:31
Size: 1726
Editor: AdamHiatt
Revision 4 as of 2012-10-25 18:04:36
Size: 1744
Editor: AdamHiatt
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
Line 19: Line 20:
Line 41: Line 42:
Line 42: Line 44:

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. [http://logging.apache.org/log4j/1.2/faq.html#a2.10 ]

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