In my .net application I am using nLog for logging ,now I want to disable .info logging (ie .error and .fatal log feature sholud be enabled) is there any option exists for that? plz help
As of today, you can use maxlevel=Off to disable a logger.
It is written everywhere that NLOG is thread-safe, but I've come through a few posts that dig things further and claim that this depends on the utilization scenario. What about my case ? I have to create thousands of loggers (not all at the same time, but still at a very high pace).
${basedir} — Directory where the application runs, aka. AppDomain.BaseDirectory.
NLog supports the following levels: Trace - Very detailed log messages, potentially of a high frequency and volume. Debug -Less detailed and/or less frequent debugging messages. Info - Informational messages.
You can set up the minimum log levels in the rules section of the nlog config in your app.config file. So for example, the following will configure nlog so that only warnings and above (which includes errors and fatals, but not info or trace) will be logged to a target named 'file':
<nlog>
<rules>
<logger name="*" minlevel="Warn" writeTo="file" />
</rules>
</nlog>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With