NLog Logging Library

LogManager.DisableLogging Method 

[This is preliminary documentation and subject to change.]

Decreases the log enable counter and if it reaches -1 the logs are disabled.

[Visual Basic]
Public Shared Function DisableLogging() As IDisposable
[C#]
public static IDisposable DisableLogging();

Return Value

An object that iplements IDisposable whose Dispose() method reenables logging. To be used with C# using () statement.

Remarks

Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.

See Also

LogManager Class | NLog Namespace