Click or drag to resize

NLogLoggingConfiguration Class

Configures NLog through Microsoft Extension Configuration section (Ex from appsettings.json)
Inheritance Hierarchy
SystemObject
  NLog.ConfigLoggingConfiguration
    NLog.ConfigLoggingConfigurationParser
      NLog.Extensions.LoggingNLogLoggingConfiguration

Namespace:  NLog.Extensions.Logging
Assembly:  NLog.Extensions.Logging (in NLog.Extensions.Logging.dll) Version: 5.3.13+9106fa3b6a3bdf3fbae3d40dbd52b6c23eb3b9f3
Syntax
public class NLogLoggingConfiguration : LoggingConfigurationParser

The NLogLoggingConfiguration type exposes the following members.

Properties
  NameDescription
Public propertyAllTargets
Gets all targets.
(Inherited from LoggingConfiguration.)
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 propertyFileNamesToWatch
Gets the collection of file names which should be watched for changes by NLog.
(Inherited from LoggingConfiguration.)
Public propertyLogFactory
Gets the factory that will be configured
(Inherited from LoggingConfiguration.)
Public propertyLoggingRules
Gets the collection of logging rules.
(Inherited from LoggingConfiguration.)
Public propertyVariables
Gets the variables defined in the configuration or assigned from API
(Inherited from LoggingConfiguration.)
Top
Methods
  NameDescription
Public methodAddRule(LoggingRule)
Add a rule object.
(Inherited from LoggingConfiguration.)
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 methodAddRule(LogLevel, LogLevel, Target, String, Boolean)
Add a rule with min- and maxLevel.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForAllLevels(String, String)
Add a rule for all loglevels.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForAllLevels(Target, String)
Add a rule for all loglevels.
(Inherited from LoggingConfiguration.)
Public methodAddRuleForAllLevels(Target, String, Boolean)
Add a rule for all 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 methodAddRuleForOneLevel(LogLevel, Target, String, Boolean)
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 methodFindRuleByName
Lookup the logging rule with matching RuleName
(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.)
Protected methodLoadConfig
Loads NLog configuration from provided config section
(Inherited from LoggingConfigurationParser.)
Protected methodOnConfigurationAssigned
Notify the configuration when Configuration has been assigned / unassigned.
(Inherited from LoggingConfiguration.)
Protected methodParseNLogSection
Parses a single config section within the NLog-config
(Inherited from LoggingConfigurationParser.)
Protected methodPrepareForReload
Allow this new configuration to capture state from the old configuration
(Inherited from LoggingConfiguration.)
Public methodReload
Called by LogManager when one of the log configuration files changes.
(Inherited from LoggingConfiguration.)
Public methodRemoveRuleByName
Removes the specified named logging rule with matching RuleName
(Inherited from LoggingConfiguration.)
Public methodRemoveTarget
Removes the specified named target.
(Inherited from LoggingConfiguration.)
Public methodToString
Returns a string that represents the current object.
(Inherited from LoggingConfiguration.)
Public methodUninstall
Uninstalls target-specific objects from current system.
(Inherited from LoggingConfiguration.)
Top
See Also