Click or drag to resize
XmlLoggingConfiguration Class
A class for configuring NLog through an XML configuration file (App.config style or App.nlog style).
Inheritance Hierarchy

Namespace: NLog.Config
Assembly: NLog (in NLog.dll) Version: 4.3.0
Syntax
public class XmlLoggingConfiguration : LoggingConfiguration

The XmlLoggingConfiguration type exposes the following members.

Constructors
  NameDescription
Public methodXmlLoggingConfiguration(String)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(String, LogFactory)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(String, Boolean)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(XmlReader, String)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(String, Boolean, LogFactory)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(XmlReader, String, LogFactory)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(XmlReader, String, Boolean)
Initializes a new instance of the XmlLoggingConfiguration class.
Public methodXmlLoggingConfiguration(XmlReader, String, Boolean, LogFactory)
Initializes a new instance of the XmlLoggingConfiguration class.
Top
Properties
  NameDescription
Public propertyAllTargets
Gets all targets.
(Inherited from LoggingConfiguration.)
Public propertyStatic memberAppConfig
Gets the default LoggingConfiguration object by parsing the application configuration file (app.exe.config).
Public propertyAutoReload
Gets or sets a value indicating whether all of the configuration files should be watched for changes and reloaded automatically when changed.
Public propertyConfiguredNamedTargets
Gets a collection of named targets specified in the configuration.
(Inherited from LoggingConfiguration.)
Public propertyDefaultCultureInfo
Gets or sets the default culture info to use as FormatProvider.
(Inherited from LoggingConfiguration.)
Public propertyExceptionLoggingOldStyle Obsolete.
Use the old exception log handling of NLog 3.0?
(Inherited from LoggingConfiguration.)
Public propertyFileNamesToWatch
Gets the collection of file names which should be watched for changes by NLog. This is the list of configuration files processed. If the autoReload attribute is not set it returns empty collection.
(Overrides LoggingConfigurationFileNamesToWatch.)
Public propertyInitializeSucceeded
Did the Initialize(XmlReader, String, Boolean) Succeeded? true= success, false= error, null = initialize not started yet.
Public propertyLoggingRules
Gets the collection of logging rules.
(Inherited from LoggingConfiguration.)
Public propertyVariables
Gets the variables defined in the configuration.
(Inherited from LoggingConfiguration.)
Top
Methods
  NameDescription
Public methodAddRule(LogLevel, LogLevel, Target, String)
Add a rule with min- and maxLevel.
(Inherited from LoggingConfiguration.)
Public methodAddRule(LogLevel, LogLevel, String, String)
Add a rule with min- and maxLevel.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForAllLevels(String, String)
Add a rule for alle loglevels.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForAllLevels(Target, String)
Add a rule for alle loglevels.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForOneLevel(LogLevel, Target, String)
Add a rule for one loglevel.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForOneLevel(LogLevel, String, String)
Add a rule for one loglevel.
(Inherited from LoggingConfiguration.)
Public methodAddTarget(Target)
Registers the specified target object. The name of the target is read from Name.
(Inherited from LoggingConfiguration.)
Public methodAddTarget(String, Target)
Registers the specified target object under a given name.
(Inherited from LoggingConfiguration.)
Public methodFindTargetByName(String)
Finds the target with the specified name.
(Inherited from LoggingConfiguration.)
Public methodInstall
Installs target-specific objects on current system.
(Inherited from LoggingConfiguration.)
Public methodReload
Re-reads the original configuration file and returns the new LoggingConfiguration object.
(Overrides LoggingConfigurationReload.)
Public methodRemoveTarget
Removes the specified named target.
(Inherited from LoggingConfiguration.)
Public methodUninstall
Uninstalls target-specific objects from current system.
(Inherited from LoggingConfiguration.)
Top
Remarks
This class is thread-safe..ToList() is used for that purpose.
See Also