How to configure NLog to only log from a certain level for a logger namespace for *all* targets

The solution is:

<logger name="Component.*" maxlevel="Info" final="true" />

You basically say, for logger(s) X, I want to skip all log entries that match Info or lower as this does not have the writeTo attribute.

It is documented here:

https://github.com/nlog/NLog/wiki/Configuration-file

With the sample:

<logger name="Name.Space.*" minlevel="Debug" maxlevel="Error" final="true" />

Leave a Comment