title: NLog not writing from referenced dll
body: <p>I have a dll that I created for sending email. I have NLog included in that project that logs to c:\logs{logfilename.log} &lt;--This is either an error or event log. 
  When working with the project locally it works just fine and writes out to the file during testing. 
  When I reference the emailing dll from another project that also has NLog it is not outputting to the log files. The config from the email dll is in the bin directory of the new project that is referencing it. I can create logs from the new project using a trace but it didn't print the email dll entries. Is there something special I need to do in my new project to get the email dll to write the logs?  I've searched for an answer to this but the keywords do not produce the results I would need.  I'm new to NLog, please be gentle.</p>
  
  <p>NLog.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;targets&gt;
  &lt;target xsi:type="File"
          name="default"
          layout="${longdate} - ${level:uppercase=true}: ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}"
          fileName="C:\logs\default.log"
          keepFileOpen="false"
          archiveFileName="C:\logs\NTC_Utility\default.{##}.log"
          archiveNumbering="Sequence"
          archiveEvery="Day"
          maxArchiveFiles="30"
          /&gt;
  &lt;target xsi:type="File"
      name="error"
      layout="${longdate} - ${level:uppercase=true}: ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}"
      fileName="C:\logs\error.log"
      keepFileOpen="false"
      archiveFileName="C:\logs\NTC_Utility\error.{##}.log"
      archiveNumbering="Sequence"
      archiveEvery="Day"
      maxArchiveFiles="90"
          /&gt;
  
  &lt;target xsi:type="File"
          name="emailLog"
          layout="-------------------- ${message} (${longdate}) --------------------${newline}
  From: ${event-context:item=From}${newline}
  To: ${event-context:item=To}${newline}
  BCC: ${event-context:item=Bcc}${newline}
  CC: ${event-context:item=CC}${newline}
  Subject: ${event-context:item=Subject}${newline}
  Body: ${event-context:item=Body}${newline}
  Attachments: ${event-  context:item=Attachments}${newline}--------------------------------------------------------------------${newline}"
          fileName="C:\logs\EmailLog.log"
          keepFileOpen="false"
          archiveFileName="C:\logs\NTC_Utility\EmailLog_.{##}.log"
          archiveNumbering="Sequence"
          archiveEvery="Day"
          maxArchiveFiles="90"
          /&gt;
  
  &lt;/targets&gt;
  
  &lt;rules&gt;
  &lt;logger name="*" writeTo="error" level="Error" final="true" /&gt;
  &lt;logger name="*" writeTo="emailLog" level="Info" final="true" /&gt;
  &lt;logger name="*" writeTo="default" minLevel="Debug" /&gt;
  &lt;/rules&gt;
  &lt;/nlog&gt;
  </code></pre>
  
  <p>This is my Log.cs from the compiled utility dll</p>
  
  <pre><code>using NLog;
  namespace NTC.Utility
  {
      internal static class Log
      {
          public static Logger Instance { get; private set;}
          static Log()
          {
              LogManager.ReconfigExistingLoggers();
              Instance = LogManager.GetCurrentClassLogger();
          }
      }
  }
  </code></pre>
  
  <p>This line calls my Logging Method after the email is sent.</p>
  
  <pre><code>LogEmailSent(imperEmail);
  </code></pre>
  
  <p>Which calls this method...</p>
  
  <pre><code>    private void LogEmailSent(EmailMessage email)
      {            
          Logger logger = LogManager.GetCurrentClassLogger();
          LogEventInfo thisEvent = new LogEventInfo(LogLevel.Info, "default","Email Sent");
          thisEvent.Properties["From"] = email.From;
          thisEvent.Properties["To"] = EmailCollectionToCsv(email.ToRecipients);            
          thisEvent.Properties["Bcc"] = EmailCollectionToCsv(email.BccRecipients);
          thisEvent.Properties["CC"] = EmailCollectionToCsv(email.CcRecipients);
          thisEvent.Properties["Subject"] = email.Subject;
          thisEvent.Properties["Body"] = email.Body;
          thisEvent.Properties["Attachments"] = AttachmentCollectionToCsv(email.Attachments);
          logger.Log(thisEvent);
  
      }
  </code></pre>