title: How to create NTEventlogAppender.dll as required for logging event in the eventlog using log4cplus
body: <p>First, Let me thank for the log4cplus source code.</p>
  
  <p>I am facing one issue as follows:</p>
  
  <p>What I am trying to do?
  I want to log the messages to event log on windows.</p>
  
  <p>What did I do?
  I could get the event logging enabled by in including following .h </p>
  
  <pre><code>          #include &lt;log4cplus/nteventlogappender.h&gt;
  </code></pre>
  
  <p>And creating the appender as follows:</p>
  
  <pre><code>          SharedAppenderPtr append_3(new NTEventLogAppender(LOG4CPLUS_TEXT("127.0.0.1"), LOG4CPLUS_TEXT("log"), LOG4CPLUS_TEXT("source")));
            append_3-&gt;setName(LOG4CPLUS_TEXT("ToEventlog"));
  
            Logger to_eventlog = Logger::getInstance(LOG4CPLUS_TEXT("to_eventlog"));
            to_eventlog.addAppender(append_3);
            to_eventlog.setLogLevel(log4cplus::ALL_LOG_LEVEL);
  </code></pre>
  
  <p>And logging as </p>
  
  <pre><code>         Logger to_eventlog = Logger::getInstance(LOG4CPLUS_TEXT("to_eventlog"));
           LOG4CPLUS_FATAL(to_eventlog, “Test Message.”);
  </code></pre>
  
  <p>When I log the message, I get following in the event log:</p>
  
  <hr>
  
  <p>The description for Event ID 4096 from source source cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.</p>
  
  <p>If the event originated on another computer, the display information had to be saved with the event.</p>
  
  <p>The following information was included with the event: </p>
  
  <p>Test Message.</p>
  
  <p>the message resource is present but the message is not found in the string/message table</p>
  
  <hr>
  
  <p>I tried to create a dll with name NTEventLogAppender.dll with string table resource and a string with id 4096 (as hardcoded in the nteventlogappender.cxx file in log4cplus) and compiled it with resource only dll (/NOENTRY) but I still keep getting above error.</p>
  
  <p>I already tried question to log4cplus-devel@lists.sourceforge.net but did not get any answer yet.</p>
  
  <p>Any help on how to create this dll would be greatly appreciated.</p>
  
  <p>Thanks.</p>