NLog.LogFactory
Creates and manages instances of Logger objects.
Gets or sets a value indicating whether to automatically call Shutdown
on AppDomain.Unload or AppDomain.ProcessExit
Gets or sets the current logging configuration.
Gets or sets the default culture info to use as FormatProvider.
Gets or sets the global log level threshold. Log events below this threshold are not logged.
Gets or sets a value indicating whether Variables should be kept on configuration reload.
Repository of interfaces used by NLog to allow override for dependency injection
Gets or sets a value indicating whether NLogConfigurationException should be thrown.
If null then ThrowExceptions is used.
Gets or sets a value indicating whether exceptions should be thrown. See also ThrowConfigExceptions.
Occurs when logging Configuration changes. Both when assigned to new config or config unloaded.
public LogFactory()
Initializes a new instance of the LogFactory class.
Obsolete instead use LogFactory default-constructor, and assign Configuration with NLog 5.0.
Initializes a new instance of the LogFactory class.
Creates a logger that discards all log messages.
Shutdown logging
Shutdown logging without flushing async
Flush any pending log messages, and shutdown logging
Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds.
Flush any pending log messages (in case of asynchronous targets).
Flush any pending log messages (in case of asynchronous targets).
Flush any pending log messages (in case of asynchronous targets).
Flush any pending log messages (in case of asynchronous targets).
Flush any pending log messages (in case of asynchronous targets).
Flush any pending log messages
Obsolete and replaced by Setup and LoadConfigurationFromFile with NLog v5.2.
Get file paths (including filename) for the possible NLog config files.
Gets the logger with the full name of the current class, so namespace and class name.
Gets the logger with the full name of the current class, so namespace and class name.
Use T to create instance of a custom Logger.
If you haven't defined your own Logger class, then use the overload without the type parameter.
Obsolete and replaced by GetCurrentClassLogger<T> with NLog v5.2.
Gets a custom logger with the full name of the current class, so namespace and class name.
Use loggerType to create instance of a custom Logger.
If you haven't defined your own Logger class, then use the overload without the loggerType.
Gets the specified named logger.
Gets the specified named logger.
Use T to create instance of a custom Logger.
If you haven't defined your own Logger class, then use the overload without the type parameter.
Obsolete and replaced by GetLogger<T> with NLog v5.2.
Gets the specified named logger.
Use loggerType to create instance of a custom Logger.
If you haven't defined your own Logger class, then use the overload without the loggerType.
Returns true if logging is currently enabled.
Obsolete and replaced by Setup and LoadConfigurationFromFile with NLog v5.2.
Loads logging configuration from file (Currently only XML configuration files supported)
Raises the event when the configuration is reloaded.
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.
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.
Obsolete and replaced by Setup and LoadConfigurationFromFile with NLog v5.2.
Clear the candidate file paths and return to the defaults.
Resumes logging if having called SuspendLogging.
Obsolete and replaced by Setup and LoadConfigurationFromFile with NLog v5.2.
Overwrite the candidates paths (including filename) for the possible NLog config files.
Begins configuration of the LogFactory options using fluent interface
Begins configuration of the LogFactory options using fluent interface
Dispose all targets, and shutdown logging.
Suspends the logging, and returns object for using-scope so scope-exit calls ResumeLogging