You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using NLog.Web.AspNetCore version 4.4.1. I have this configuration (modified from one of the tutorials):
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="c:\temp\hosted-internal-nlog.txt">
<!-- Load the ASP.NET Core plugin -->
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
<!-- the targets to write to -->
<targets>
<!-- write logs to file -->
<target xsi:type="File" name="allfile" fileName="c:\temp\hosted-nlog-all-${shortdate}.log"
layout="${longdate}|${uppercase:${level}}|${event-properties:item=EventId.Id}|${logger}|${message} ${exception}" />
<!-- another file log, only own logs. Uses some ASP.NET core renderers -->
<target xsi:type="File" name="ownFile-web" fileName="c:\temp\hosted-nlog-own-${shortdate}.log"
layout="${longdate}|${uppercase:${level}}|${event-properties:item=EventId.Id}|${logger}|${message} ${exception:format=tostring,data}|${aspnet-request-url}|${aspnet-mvc-action}" />
<!-- write to the void aka just remove -->
<target xsi:type="Null" name="blackhole" />
</targets>
<!-- rules to map from logger name to target -->
<rules>
<!--All logs, including from Microsoft-->
<logger name="*" minlevel="Trace" writeTo="allfile" />
<!--Skip Microsoft logs and so log only own logs-->
<logger name="Microsoft.*" minlevel="Trace" writeTo="blackhole" final="true" />
<logger name="*" minlevel="Trace" writeTo="ownFile-web" />
</rules>
</nlog>
Obviously, minlevel is set to "Trace", however, when I do this:
Using
NLog.Web.AspNetCore
version 4.4.1. I have this configuration (modified from one of the tutorials):Obviously, minlevel is set to "Trace", however, when I do this:
only the INFO line is actually visible in log files, while Trace and Debug lines never get logged.
The text was updated successfully, but these errors were encountered: