title: How can I use NLog library in .net core Console App?
body: <p>I have an .net core console application for chatting. I have two console app in my solution that names Client and Server. I want to log my activities. And I use nLog library for that. I implemented nlog and nlog.config Nuget Packages from Nuget Package Manager.</p>
  
  <p>This is my NLog.config 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="false"
    internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log"&gt;
  
  
  &lt;targets&gt;
  
   &lt;target name="database" xsi:type="Database"
        dbProvider="Npgsql.NpgsqlConnection, Npgsql"
        connectionString="***myPrivateConnectionString***"
           &gt;
    &lt;commandText&gt;
      insert into train_server_logs(
      Application, Logged, Level, Message,
      Logger, CallSite, Exception
      ) values (
      @Application, @Logged, @Level, @Message,
      @Logger, @Callsite, @Exception
      );
    &lt;/commandText&gt;
  
    &lt;parameter name="@application" layout="AspNetCoreNlog" /&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="@logger" layout="${logger}" /&gt;
    &lt;parameter name="@callSite" layout="${callsite:filename=true}" /&gt;
    &lt;parameter name="@exception" layout="${exception:tostring}" /&gt;
    &lt;/target&gt;
  &lt;/targets&gt;
  
      &lt;rules&gt;
         &lt;logger name="databaseLogger" minlevel="Trace" writeTo="database" /&gt;
      &lt;/rules&gt;
  &lt;/nlog&gt;
  </code></pre>
  
  <p>And this is my ChatServer project;</p>
  
  <pre><code> namespace TcpChatServer
    {
      static void Main(string[] args)
        {
                       Logger logger = LogManager.GetLogger("databaseLogger");
                       logger.Info("Server Working!");
        }
    }
  </code></pre>
  
  <p>And this is my ChatClient project;</p>
  
  <pre><code> namespace TcpChatClient
    {
      static void Main(string[] args)
        {
                       Logger logger = LogManager.GetLogger("databaseLogger");
                       logger.Info("Client working!");
        }
    }
  </code></pre>
  
  <p>I am running my solution with multiple startup. And than when I check my database. Server side log was succussfully logged but client side log was not appear.</p>
  
  <p>What is my problem?</p>
  
  <p>Many Thanks!</p>