[This is preliminary documentation and is subject to change.]

The LogManager type exposes the following members.

Methods

  NameDescription
CreateNullLogger
Creates a logger that discards all log messages.
DisableLogging
Decreases the log enable counter and if it reaches -1 the logs are disabled.
EnableLogging
Increases the log enable counter and if it reaches 0 the logs are disabled.
FlushOverloaded.
GetCurrentClassLoggerOverloaded.
GetLoggerOverloaded.
IsLoggingEnabled
Returns trueTruetruetrue (True in Visual Basic) 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.
Shutdown
Dispose all targets, and shutdown logging.

Properties

  NameDescription
Configuration
Gets or sets the current logging configuration.
DefaultCultureInfo
Gets or sets the default culture to use.
GlobalThreshold
Gets or sets the global log threshold. Log events below this threshold are not logged.
ThrowExceptions
Gets or sets a value indicating whether NLog should throw exceptions. By default exceptions are not thrown under any circumstances.

Events

  NameDescription
ConfigurationChanged
Occurs when logging Configuration changes.
ConfigurationReloaded
Occurs when logging Configuration gets reloaded.

See Also