for some weird reason nlog is not displaying anything when I write to the console, in the Main() method in Program.cs I assign the nlog.config:
LogManager.Configuration = new XmlLoggingConfiguration("assets/packages/nlog/nlog.config");
Here is the Config:
<nlog throwExceptions="true">
<targets>
<target name="file" type="File" fileName="${basedir}/assets/logging/log.txt" />
</targets>
<rules>
<logger name="*" minLevel="Info" writeTo="File" />
</rules>
</nlog>
Here is a sample class:
private static readonly ILogger Logger = LogManager.GetCurrentClassLogger();
public MyClass()
{
Console.Write("lol");
Logger.Debug("Debug test...");
Logger.Error("Debug test...");
Logger.Fatal("Debug test...");
Logger.Info("Debug test...");
Logger.Trace("Debug test...");
Logger.Warn("Debug test...");
}
I know the method is being called because I get "lol", just not the actual log on the console, but it does write to /assets/logging/log.txt file.