Click or drag to resize

LogManager Methods

The LogManager type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddHiddenAssembly Obsolete.
Adds the given assembly which will be skipped when NLog is trying to find the calling method on stack trace.
Public methodStatic memberCreateNullLogger
Creates a logger that discards all log messages.
Public methodStatic memberFlush
Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds.
Public methodStatic memberFlush(AsyncContinuation)
Flush any pending log messages (in case of asynchronous targets).
Public methodStatic memberFlush(Int32)
Flush any pending log messages (in case of asynchronous targets).
Public methodStatic memberFlush(TimeSpan)
Flush any pending log messages (in case of asynchronous targets).
Public methodStatic memberFlush(AsyncContinuation, Int32)
Flush any pending log messages (in case of asynchronous targets).
Public methodStatic memberFlush(AsyncContinuation, TimeSpan)
Flush any pending log messages (in case of asynchronous targets).
Public methodStatic memberGetCurrentClassLogger
Gets the logger with the full name of the current class, so namespace and class name.
Public methodStatic memberGetLogger
Gets the specified named logger.
Public methodStatic memberIsLoggingEnabled
Returns if logging is currently enabled.
Public methodStatic memberReconfigExistingLoggers
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.
Public methodStatic memberReconfigExistingLoggers(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.
Public methodStatic memberResumeLogging
Public methodStatic memberSetup
Begins configuration of the LogFactory options using fluent interface
Public methodStatic memberSetup(ActionISetupBuilder)
Begins configuration of the LogFactory options using fluent interface
Public methodStatic memberShutdown
Dispose all targets, and shutdown logging.
Public methodStatic memberSuspendLogging
Suspends the logging, and returns object for using-scope so scope-exit calls ResumeLogging
Top
See Also