C# Класс NLog.Config.LoggingConfiguration

Keeps logging configuration and provides simple API to modify it.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

AddTarget() публичный Метод

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. ///
Результат void

FindTargetByName() публичный Метод

Finds the target with the specified name.
public FindTargetByName ( string name ) : Target
name string /// The name of the target to be found. ///
Результат NLog.Targets.Target

Install() публичный Метод

Installs target-specific objects on current system.
Installation typically runs with administrative permissions.
public Install ( InstallationContext installationContext ) : void
installationContext InstallationContext The installation context.
Результат void

LoggingConfiguration() публичный Метод

Initializes a new instance of the LoggingConfiguration class.
public LoggingConfiguration ( ) : System
Результат System

Reload() публичный Метод

Called by LogManager when one of the log configuration files changes.
public Reload ( ) : LoggingConfiguration
Результат LoggingConfiguration

RemoveTarget() публичный Метод

Removes the specified named target.
public RemoveTarget ( string name ) : void
name string /// Name of the target. ///
Результат void

Uninstall() публичный Метод

Uninstalls target-specific objects from current system.
Uninstallation typically runs with administrative permissions.
public Uninstall ( InstallationContext installationContext ) : void
installationContext InstallationContext The installation context.
Результат void