title: Separate log file for specific class instance using NLog
body: <p>I need to write event log for every instance of class to separate file. Historically project uses NLog for logging, so  I want to try resolving this issue using NLog (I've found similar topic <a href="https://stackoverflow.com/questions/6191874/unique-log-file-for-each-instance-of-class">Unique log file for each instance of class</a> , but it's suggests using log4net) </p>
  
  <p>Currently I'm getting instance of logger like this:</p>
  
  <pre><code>    public static Logger GetInstanceLogger(string name, bool init = false)
      {
          if (!LogManager.Configuration.AllTargets.Any(t =&gt; t.Name == name))
          {
              var target = new FileTarget();
  
                  target.Name = name;
                  target.FileName = string.Format("logs/{0}.${{shortdate}}.log", name);
  
              target.Layout =
             "${date:format=dd.MM.yyyy HH\\:mm\\:ss.fff} thread[${threadid}] ${logger} (${level:uppercase=true}): ${message}. ${exception:format=ToString}";
              var config = init ? new LoggingConfiguration() : LogManager.Configuration;
              config.AddTarget(name, target);
  
              var ruleInfo = new LoggingRule("*", LogLevel.Trace, target);
  
              config.LoggingRules.Add(ruleInfo);
  
              LogManager.Configuration = config;
  
              LogManager.ReconfigExistingLoggers();
          }
  
          var logger = LogManager.GetLogger(name);
  
          return logger;
      }
  </code></pre>
  
  <p>Right now it's writing same log into all files (I suppose it's caused by the log level). Is there a way to accomplish this task using NLog?</p>
  
  <p>Thanks.</p>