Click or drag to resize

LogManagerSuspendLogging Method

Suspends the logging, and returns object for using-scope so scope-exit calls ResumeLogging

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public static IDisposable SuspendLogging()

Return Value

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