NLog 4.6.6
I have tried everything to get a specific logger disabled and can't get it to work. I'm wondering if it's a bug in NLog. Based on documentation:
There is one more level, Off. Since it is the highest value and is not used for entries, it disables logging when used as the minimum log level.
and:
In case a rule is marked as final and contains any level-declaring attributes, the final attribute applies only to the specified levels.
So if I do the internet-recommended route (even this SO answer), it still gets logged.
<logger name="Example.*" minlevel="Off" final="true" />
<logger name="*" minlevel="Trace" writeTo="file" />
It is important for the answer to show the logger as disabled -- in order to short-circuit expensive debug code -- and not just dump it into the Null target.