NLog Console application
<p>I have a Console application and for logging its activities i copied the same Nlog.config file that I had on my web application. 
I also imported <em>Nlog.Extended</em> and <em>Nlog.Web</em>.
I also checked Nlog.config properties (<em>Build Action = Content, copy to output directory = copy Always</em>) and set internalLogFile and internalLogLevel.</p>

<p>When</p>

<pre><code>private static Logger logger = LogManager.GetCurrentClassLogger();
</code></pre>

<p>is called 'System.TypeInitializationException' is thwown and, after all </p>

<pre><code>Scanning XXXXLayoutRenderer (all parameter in my config)
</code></pre>

<p>this compares on my internal log file</p>

<pre><code>Info Found 105 configuration items
</code></pre>

<p>And nothing else</p>

<p>This is my <strong>NLog.config</strong> file</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"
        xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
        autoReload="true"
        throwExceptions="true"
        internalLogFile="c:\Temp\internal_log_file.txt"
        internalLogLevel="Trace"
        internalLogToConsole="true"&gt;


    &lt;variable name="brief" value="${longdate} | ${level} | ${message}"/&gt;
    &lt;variable name="verbose" value="${longdate} | ${machinename} | ${processid} | ${processname} | ${level} | ${logger} | ${message}"/&gt;
    &lt;variable name="logDirectory" value="${basedir}/Logs/${date:format=yyyyMM}"/&gt;

    &lt;targets&gt;


      &lt;!-- FILE target --&gt;
      &lt;target name="file" xsi:type="File" layout="${brief}" fileName="${logDirectory}/${shortdate}.txt"/&gt;

      &lt;!-- EMAIL target --&gt;
      &lt;target name="email" xsi:type="Mail"
              smtpServer="smtp.gmail.com"
              smtpPort="587"
              smtpAuthentication="Basic"
              smtpUserName="user@gmail.com"
              smtpPassword="password"
              enableSsl="true"
              from="user@gmail.com"
              to="user@gmail.com"
              layout="${verbose}"
            /&gt;

      &lt;!-- DATABASE target --&gt;
      &lt;target name="database" xsi:type="Database"&gt;


        &lt;connectionStringName&gt;NLogEntities&lt;/connectionStringName&gt;

        &lt;commandText&gt;
          insert into dbo.Log (
          Application, Logged, Level, Message,
          Username,
          ServerName, Port, Url, Https,
          ServerAddress, RemoteAddress,
          Logger, CallSite, Exception
          ) values (
          @Application, @Logged, @Level, @Message,
          @Username,
          @ServerName, @Port, @Url, @Https,
          @ServerAddress, @RemoteAddress,
          @Logger, @Callsite, @Exception
          );
        &lt;/commandText&gt;
        &lt;parameter name="@application" layout="${appsetting:key=AppName:default=Unknown}" /&gt;
        &lt;parameter name="@logged" layout="${date}" /&gt;
        &lt;parameter name="@level" layout="${level}" /&gt;
        &lt;parameter name="@message" layout="${message}" /&gt;

        &lt;parameter name="@username" layout="${identity}" /&gt;

        &lt;parameter name="@serverName" layout="${aspnet-request:serverVariable=SERVER_NAME:default=Unknown}" /&gt;
        &lt;parameter name="@port" layout="${aspnet-request:serverVariable=SERVER_PORT}" /&gt;
        &lt;parameter name="@url" layout="${aspnet-request:serverVariable=HTTP_URL}" /&gt;
        &lt;parameter name="@https" layout="${when:inner=1:when='${aspnet-request:serverVariable=HTTPS}' == 'on'}${when:inner=0:when='${aspnet-request:serverVariable=HTTPS}' != 'on'}" /&gt;

        &lt;parameter name="@serverAddress" layout="${aspnet-request:serverVariable=LOCAL_ADDR}" /&gt;
        &lt;parameter name="@remoteAddress" layout="${aspnet-request:serverVariable=REMOTE_ADDR}:${aspnet-request:serverVariable=REMOTE_PORT}" /&gt;

        &lt;parameter name="@logger" layout="${logger}" /&gt;
        &lt;parameter name="@callSite" layout="${callsite}" /&gt;
        &lt;parameter name="@exception" layout="${exception:tostring}" /&gt;
      &lt;/target&gt;
    &lt;/targets&gt;
    &lt;rules&gt;
      &lt;!-- DATABASE rules --&gt;
      &lt;logger name="*" minlevel="Error" writeTo="database" /&gt;
      &lt;!-- EMAIL rules --&gt;
      &lt;logger name="*" minlevel="Error" writeTo="email" /&gt;
      &lt;!-- FILE rules --&gt;
      &lt;logger name="*" minlevel="Trace" writeTo="file" /&gt;
    &lt;/rules&gt;
  &lt;/nlog&gt;
</code></pre>

<p>And this is the <strong>output internal log file</strong></p>

<pre><code>    2016-01-22 12:47:43.0520 Debug ScanAssembly('NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c')
    ....
    ....

    2016-01-22 12:47:43.2532 Trace    Scanning LongDateLayoutRenderer 'Layout Renderer: ${longdate}'
    2016-01-22 12:47:43.2532 Trace    Scanning LiteralLayoutRenderer 'Layout Renderer: ${literal}'
    2016-01-22 12:47:43.2532 Trace    Scanning LevelLayoutRenderer 'Layout Renderer: ${level}'
    2016-01-22 12:47:43.2532 Trace    Scanning LiteralLayoutRenderer 'Layout Renderer: ${literal}'
    2016-01-22 12:47:43.2532 Trace    Scanning MessageLayoutRenderer 'Layout Renderer: ${message}'
    2016-01-22 12:47:43.2532 Info Found 105 configuration items
</code></pre>

<p><strong>Where is the problem?</strong></p>