Click or drag to resize
LogManager Methods

The LogManager type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddHiddenAssembly
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 memberDisableLogging
Decreases the log enable counter and if it reaches -1 the logs are disabled.
Public methodStatic memberEnableLogging
Increases the log enable counter and if it reaches 0 the logs are disabled.
Public methodStatic memberFlush
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)
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 name of the current class.
Public methodStatic memberGetCurrentClassLogger(Type)
Gets a custom logger with the name of the current class. Use loggerType to pass the type of the needed Logger.
Public methodStatic memberGetLogger(String)
Gets the specified named logger.
Public methodStatic memberGetLogger(String, Type)
Gets the specified named custom logger. Use loggerType to pass the type of the needed Logger.
Public methodStatic memberIsLoggingEnabled
Checks 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 memberShutdown
Dispose all targets, and shutdown logging.
Top
See Also