C# Class NLog.Config.LoggingConfiguration

Keeps logging configuration and provides simple API to modify it.
Mostrar archivo Open project: shiftkey/winrt-backport-hilarity Class Usage Examples

Public Methods

Method Description
AddTarget ( string name, Target target ) : void

Registers the specified target object under a given name.

FindTargetByName ( string name ) : Target

Finds the target with the specified name.

Install ( InstallationContext installationContext ) : void

Installs target-specific objects on current system.

Installation typically runs with administrative permissions.

LoggingConfiguration ( ) : System

Initializes a new instance of the LoggingConfiguration class.

Reload ( ) : LoggingConfiguration

Called by LogManager when one of the log configuration files changes.

RemoveTarget ( string name ) : void

Removes the specified named target.

Uninstall ( InstallationContext installationContext ) : void

Uninstalls target-specific objects from current system.

Uninstallation typically runs with administrative permissions.

Private Methods

Method Description
Close ( ) : void

Closes all targets and releases any unmanaged resources.

Dump ( ) : void
EnsureInitialized ( ) : void
FlushAllTargets ( AsyncContinuation asyncContinuation ) : void

Flushes any pending log messages on all appenders.

InitializeAll ( ) : void
ValidateConfig ( ) : void

Validates the configuration.

Method Details

AddTarget() public method

Registers the specified target object under a given name.
public AddTarget ( string name, Target target ) : void
name string /// Name of the target. ///
target NLog.Targets.Target /// The target object. ///
return void

FindTargetByName() public method

Finds the target with the specified name.
public FindTargetByName ( string name ) : Target
name string /// The name of the target to be found. ///
return NLog.Targets.Target

Install() public method

Installs target-specific objects on current system.
Installation typically runs with administrative permissions.
public Install ( InstallationContext installationContext ) : void
installationContext InstallationContext The installation context.
return void

LoggingConfiguration() public method

Initializes a new instance of the LoggingConfiguration class.
public LoggingConfiguration ( ) : System
return System

Reload() public method

Called by LogManager when one of the log configuration files changes.
public Reload ( ) : LoggingConfiguration
return LoggingConfiguration

RemoveTarget() public method

Removes the specified named target.
public RemoveTarget ( string name ) : void
name string /// Name of the target. ///
return void

Uninstall() public method

Uninstalls target-specific objects from current system.
Uninstallation typically runs with administrative permissions.
public Uninstall ( InstallationContext installationContext ) : void
installationContext InstallationContext The installation context.
return void