C# 클래스 NLog.Config.XmlLoggingConfiguration

A class for configuring NLog through an XML configuration file (App.config style or App.nlog style).
상속: LoggingConfiguration
파일 보기 프로젝트 열기: NLog/NLog 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddArrayItemFromElement bool
CheckParsingErrors void
CheckUnusedTargets void
CleanSpaces string
ConfigureFromFile void
ConfigureObjectFromAttributes void
ConfigureObjectFromElement void
CreateFileReader XmlReader
ExpandSimpleVariables string
GetFileLookupKey string
Initialize void
IsTargetElement bool
IsTargetRefElement bool
ParseConfigurationElement void
ParseExtensionsElement void
ParseFilters void
ParseIncludeElement void
ParseLoggerElement void
ParseNLogElement void
ParseRulesElement void
ParseTargetElement void
ParseTargetsElement void
ParseTimeElement void
ParseTopLevel void
ParseVariableElement void
SetItemFromElement bool
SetLayoutFromElement bool
SetPropertyFromElement void
StripOptionalNamespacePrefix string
TryCreateLayoutInstance NLog.Layouts.Layout
WrapWithAsyncTargetWrapper NLog.Targets.Target
WrapWithDefaultWrapper NLog.Targets.Target
XmlLoggingConfiguration System
XmlLoggingConfiguration System

공개 메소드들

메소드 설명
GetCandidateConfigFilePaths ( ) : IEnumerable

Get file paths (including filename) for the possible NLog config files.

Reload ( ) : LoggingConfiguration

Re-reads the original configuration file and returns the new LoggingConfiguration object.

ResetCandidateConfigFilePath ( ) : void

Clear the candidate file paths and return to the defaults.

SetCandidateConfigFilePaths ( IEnumerable filePaths ) : void

Overwrite the paths (including filename) for the possible NLog config files.

XmlLoggingConfiguration ( XmlReader reader, string fileName ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( XmlReader reader, string fileName, LogFactory logFactory ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( XmlReader reader, string fileName, bool ignoreErrors ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( XmlReader reader, string fileName, bool ignoreErrors, LogFactory logFactory ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( string fileName ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( string fileName, LogFactory logFactory ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( string fileName, bool ignoreErrors ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( string fileName, bool ignoreErrors, LogFactory logFactory ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

비공개 메소드들

메소드 설명
AddArrayItemFromElement ( object o, NLog.Config.NLogXmlElement element ) : bool
CheckParsingErrors ( NLog.Config.NLogXmlElement rootContentElement ) : void

Checks whether any error during XML configuration parsing has occured. If there are any and ThrowConfigExceptions or ThrowExceptions setting is enabled - throws NLogConfigurationException, otherwise just write an internal log at Warn level.

CheckUnusedTargets ( ) : void

Checks whether unused targets exist. If found any, just write an internal log at Warn level. If initializing not started or failed, then checking process will be canceled

CleanSpaces ( string s ) : string

Remove all spaces, also in between text.

Tabs and other whitespace is not removed!

ConfigureFromFile ( string fileName, bool autoReloadDefault ) : void
ConfigureObjectFromAttributes ( object targetObject, NLog.Config.NLogXmlElement element, bool ignoreType ) : void
ConfigureObjectFromElement ( object targetObject, NLog.Config.NLogXmlElement element ) : void
CreateFileReader ( string fileName ) : XmlReader

Create XML reader for (xml config) file.

ExpandSimpleVariables ( string input ) : string

Replace a simple variable with a value. The orginal value is removed and thus we cannot redo this in a later stage. Use for that: VariableLayoutRenderer

GetFileLookupKey ( string fileName ) : string
Initialize ( XmlReader reader, string fileName, bool ignoreErrors ) : void

Initializes the configuration.

IsTargetElement ( string name ) : bool
IsTargetRefElement ( string name ) : bool
ParseConfigurationElement ( NLog.Config.NLogXmlElement configurationElement, string filePath, bool autoReloadDefault ) : void

Parse {configuration} xml element.

ParseExtensionsElement ( NLog.Config.NLogXmlElement extensionsElement, string baseDirectory ) : void
ParseFilters ( LoggingRule rule, NLog.Config.NLogXmlElement filtersElement ) : void
ParseIncludeElement ( NLog.Config.NLogXmlElement includeElement, string baseDirectory, bool autoReloadDefault ) : void
ParseLoggerElement ( NLog.Config.NLogXmlElement loggerElement, IList rulesCollection ) : void

Parse {Logger} xml element

ParseNLogElement ( NLog.Config.NLogXmlElement nlogElement, string filePath, bool autoReloadDefault ) : void

Parse {NLog} xml element.

ParseRulesElement ( NLog.Config.NLogXmlElement rulesElement, IList rulesCollection ) : void

Parse {Rules} xml element

ParseTargetElement ( Target target, NLog.Config.NLogXmlElement targetElement ) : void
ParseTargetsElement ( NLog.Config.NLogXmlElement targetsElement ) : void
ParseTimeElement ( NLog.Config.NLogXmlElement timeElement ) : void
ParseTopLevel ( NLog.Config.NLogXmlElement content, string filePath, bool autoReloadDefault ) : void

Parse the root

ParseVariableElement ( NLog.Config.NLogXmlElement variableElement ) : void
SetItemFromElement ( object o, NLog.Config.NLogXmlElement element ) : bool
SetLayoutFromElement ( object o, NLog.Config.NLogXmlElement layoutElement ) : bool
SetPropertyFromElement ( object o, NLog.Config.NLogXmlElement element ) : void
StripOptionalNamespacePrefix ( string attributeValue ) : string

Remove the namespace (before :)

TryCreateLayoutInstance ( NLog.Config.NLogXmlElement element, Type type ) : Layout
WrapWithAsyncTargetWrapper ( Target target ) : Target
WrapWithDefaultWrapper ( Target t, NLog.Config.NLogXmlElement defaultParameters ) : Target
XmlLoggingConfiguration ( XmlElement element, string fileName ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

XmlLoggingConfiguration ( XmlElement element, string fileName, bool ignoreErrors ) : System

Initializes a new instance of the XmlLoggingConfiguration class.

메소드 상세

GetCandidateConfigFilePaths() 공개 정적인 메소드

Get file paths (including filename) for the possible NLog config files.
public static GetCandidateConfigFilePaths ( ) : IEnumerable
리턴 IEnumerable

Reload() 공개 메소드

Re-reads the original configuration file and returns the new LoggingConfiguration object.
public Reload ( ) : LoggingConfiguration
리턴 LoggingConfiguration

ResetCandidateConfigFilePath() 공개 정적인 메소드

Clear the candidate file paths and return to the defaults.
public static ResetCandidateConfigFilePath ( ) : void
리턴 void

SetCandidateConfigFilePaths() 공개 정적인 메소드

Overwrite the paths (including filename) for the possible NLog config files.
public static SetCandidateConfigFilePaths ( IEnumerable filePaths ) : void
filePaths IEnumerable The filepaths to the possible config file
리턴 void

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( XmlReader reader, string fileName ) : System
reader XmlReader containing the configuration section.
fileName string Name of the file that contains the element (to be used as a base for including other files).
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( XmlReader reader, string fileName, LogFactory logFactory ) : System
reader XmlReader containing the configuration section.
fileName string Name of the file that contains the element (to be used as a base for including other files).
logFactory LogFactory The to which to apply any applicable configuration values.
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( XmlReader reader, string fileName, bool ignoreErrors ) : System
reader XmlReader containing the configuration section.
fileName string Name of the file that contains the element (to be used as a base for including other files).
ignoreErrors bool Ignore any errors during configuration.
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( XmlReader reader, string fileName, bool ignoreErrors, LogFactory logFactory ) : System
reader XmlReader containing the configuration section.
fileName string Name of the file that contains the element (to be used as a base for including other files).
ignoreErrors bool Ignore any errors during configuration.
logFactory LogFactory The to which to apply any applicable configuration values.
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( string fileName ) : System
fileName string Configuration file to be read.
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( string fileName, LogFactory logFactory ) : System
fileName string Configuration file to be read.
logFactory LogFactory The to which to apply any applicable configuration values.
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( string fileName, bool ignoreErrors ) : System
fileName string Configuration file to be read.
ignoreErrors bool Ignore any errors during configuration.
리턴 System

XmlLoggingConfiguration() 공개 메소드

Initializes a new instance of the XmlLoggingConfiguration class.
public XmlLoggingConfiguration ( string fileName, bool ignoreErrors, LogFactory logFactory ) : System
fileName string Configuration file to be read.
ignoreErrors bool Ignore any errors during configuration.
logFactory LogFactory The to which to apply any applicable configuration values.
리턴 System