Click or drag to resize
LogFactorySuspendLogging Method
Decreases the log enable counter and if it reaches -1 the logs are disabled.

Namespace: NLog
Assembly: NLog (in NLog.dll) Version: 4.3.0
public IDisposable SuspendLogging()

Return Value

Type: IDisposable
An object that implements IDisposable whose Dispose() method re-enables logging. To be used with C# using () statement.
Logging is enabled if the number of ResumeLogging calls is greater than or equal to SuspendLogging calls.
See Also