Rule final attribute

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Rule final attribute

This post was updated on .
I have the configuration below (and last version of NLog, Net Framework 4, Win7 x86). My second and third rules never work. Why? I think, that for events with levels, other than "Trace", second rule should work.
    <target name="logfile" xsi:type="File" fileName="file.txt" />
    <target name="tracefile" xsi:type="File" fileName="traces.txt" />
    <target xsi:type="Console" name="cons" error="false"/>

    <logger name="*" level="Trace"  writeTo="tracefile" final="true" />
    <logger name="*" minlevel="Trace" writeTo="cons" />
    <logger name="*" minlevel="Error" writeTo="logfile" />

P.S. I think I begin to understand logic after I've studied example (
"Rule match" means "logger name match" but not "logger name and level", right?
Reply | Threaded
Open this post in threaded view

Re: Rule final attribute

Jason LaFlair
From some quick code surfing there may be a 'bug' in the final logic.