LogFactory Methods |
The LogFactory type exposes the following members.
Name | Description | |
---|---|---|
CreateNullLogger |
Creates a logger that discards all log messages.
| |
Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting
unmanaged resources.
| |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
| |
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.
| |
GetCurrentClassLoggerT | ||
GetLogger(String) |
Gets the specified named logger.
| |
GetLoggerT(String) | ||
IsLoggingEnabled |
Returns if logging is currently enabled.
| |
OnConfigurationChanged |
Raises the event when the configuration is reloaded.
| |
OnConfigurationReloaded | Obsolete.
Obsolete and replaced by OnConfigurationReloaded(LoggingConfigurationReloadedEventArgs) with NLog 5.2.
Raises the event when the configuration is reloaded.
| |
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 |