Disabling .info registration in nLog

In my .net application, I use nLog for logging, now I want to disable .info logging (i.e. enable the error function and .fatal log sholud), is there any option for this? Help plz

+4
source share
1 answer

You can configure the minimum log levels in the nlog configuration rules section in the app.config file. So, for example, the following will configure nlog so that only warnings and higher (including errors and deadly, but not information or tracing) are written to the target file with the name "file":

<nlog> <rules> <logger name="*" minlevel="Warn" writeTo="file" /> </rules> </nlog> 
+7
source

All Articles