title: Example of source for NTEventLogAppender?
body: <p>I'm trying to learn how to log from java eclipse to event viewer and I've read the api, various sites and similar questions on stack overflow.</p>
  
  <p>But when I follow the steps I always get:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.log4j.nt.NTEventLogAppender.registerEventSource(Ljava/lang/String;Ljava/lang/String;)I
  at org.apache.log4j.nt.NTEventLogAppender.registerEventSource(Native Method)
  at org.apache.log4j.nt.NTEventLogAppender.&lt;init&gt;(NTEventLogAppender.java:79)
  at org.apache.log4j.nt.NTEventLogAppender.&lt;init&gt;(NTEventLogAppender.java:65)
  </code></pre>
  
  <p>What is the source supposed to be?</p>
  
  <p>if anyone could show a full example of such a program that would be excellent. Please go into as much detail as possible, thanks.</p>
  
  <p>My code right now is:</p>
  
  <pre><code>package Output;
  
  import org.apache.log4j.BasicConfigurator;
  import org.apache.log4j.ConsoleAppender;
  import org.apache.log4j.Level;
  import org.apache.log4j.Logger;
  import org.apache.log4j.PatternLayout;
  import org.apache.log4j.PropertyConfigurator;
  import org.apache.log4j.nt.NTEventLogAppender;
  
  public class EventLog {
      public static void main(String[] args) 
      {   
  
          Logger myLogger = Logger.getLogger(EventLog.class);
  
          String mySource = "the source";
          PatternLayout myLayout = new PatternLayout("[%c][%l][%p][%thread]: %m%n");
  
          NTEventLogAppender eventLogAppender= new NTEventLogAppender(mySource,myLayout);
  
          ConsoleAppender consoleAppender= new ConsoleAppender(myLayout);
  
          myLogger.addAppender(consoleAppender);
          myLogger.addAppender(eventLogAppender);
  
          myLogger.setLevel(Level.WARN);
  
          myLogger.fatal("Come on print");
      }    
  }
  </code></pre>