LogManager Class |
Namespace: NLog
The LogManager type exposes the following members.
Name | Description | |
---|---|---|
AutoShutdown |
Gets or sets a value indicating whether to automatically call Shutdown
on AppDomain.Unload or AppDomain.ProcessExit
| |
Configuration |
Gets or sets the current logging configuration.
| |
GlobalThreshold |
Gets or sets the global log threshold. Log events below this threshold are not logged.
| |
KeepVariablesOnReload |
Gets or sets a value indicating whether Variables should be kept on configuration reload.
| |
LogFactory |
Gets the LogFactory instance used in the LogManager.
| |
ThrowConfigExceptions |
Gets or sets a value indicating whether NLogConfigurationException should be thrown.
| |
ThrowExceptions |
Gets or sets a value indicating whether NLog should throw exceptions.
By default exceptions are not thrown under any circumstances.
|
Name | Description | |
---|---|---|
AddHiddenAssembly | Obsolete.
Adds the given assembly which will be skipped
when NLog is trying to find the calling method on stack trace.
| |
CreateNullLogger |
Creates a logger that discards all log messages.
| |
Flush |
Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds.
| |
Flush(AsyncContinuation) |
Flush any pending log messages (in case of asynchronous targets).
| |
Flush(Int32) |
Flush any pending log messages (in case of asynchronous targets).
| |
Flush(TimeSpan) |
Flush any pending log messages (in case of asynchronous targets).
| |
Flush(AsyncContinuation, Int32) |
Flush any pending log messages (in case of asynchronous targets).
| |
Flush(AsyncContinuation, TimeSpan) |
Flush any pending log messages (in case of asynchronous targets).
| |
GetCurrentClassLogger |
Gets the logger with the full name of the current class, so namespace and class name.
| |
GetLogger |
Gets the specified named logger.
| |
IsLoggingEnabled |
Returns if logging is currently enabled.
| |
ReconfigExistingLoggers |
Loops through all loggers previously returned by GetLogger.
and recalculates their target and filter list. Useful after modifying the configuration programmatically
to ensure that all loggers have been properly configured.
| |
ReconfigExistingLoggers(Boolean) |
Loops through all loggers previously returned by GetLogger.
and recalculates their target and filter list. Useful after modifying the configuration programmatically
to ensure that all loggers have been properly configured.
| |
ResumeLogging |
Resumes logging if having called SuspendLogging.
| |
Setup |
Begins configuration of the LogFactory options using fluent interface
| |
Setup(ActionISetupBuilder) |
Begins configuration of the LogFactory options using fluent interface
| |
Shutdown |
Dispose all targets, and shutdown logging.
| |
SuspendLogging |
Suspends the logging, and returns object for using-scope so scope-exit calls ResumeLogging |
Name | Description | |
---|---|---|
ConfigurationChanged |
Occurs when logging Configuration changes. Both when assigned to new config or config unloaded.
|