PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­Configuration­ManagerConfigure­From­Xml
Open sandboxFocus

LoggingConfigurationManager.ConfigureFromXml Method

ConfigureFromXml(LoggingBackend, XDocument, Boolean)

Configures a LoggingBackend from an XDocument.

Declaration
public static void ConfigureFromXml([Required] this LoggingBackend backend, [Required] XDocument xml, bool throwing = false)
Parameters
Type Name Description
LoggingBackend backend

The backend to configure.

XDocument xml

The configuration file. The schema is described in the LoggingConfigurationModel type.

Boolean throwing

true if errors should be reported as exceptions, false if they should be handled without exception. The default is false. The true value is used for debugging and diagnostics.

ConfigureFromXml(LoggingBackend, XElement, Boolean)

Configures a LoggingBackend from an System.Xml.Linq.XElement.

Declaration
public static void ConfigureFromXml([Required] this LoggingBackend backend, [Required] XElement xml, bool throwing = false)
Parameters
Type Name Description
LoggingBackend backend

The backend to configure.

System.Xml.Linq.XElement xml

The configuration file. The schema is described in the LoggingConfigurationModel type.

Boolean throwing

true if errors should be reported as exceptions, false if they should be handled without exception. The default is false. The true value is used for debugging and diagnostics.