PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLogging­Verbosity­Configuration
Open sandboxFocus

LoggingVerbosityConfiguration Class

Manages the configuration of the minimal LogLevel for individual types and namespaces. This class is exposed by the Verbosity property. To create a new instance of this class, call CreateVerbosityConfiguration().

Inheritance
LoggingVerbosityConfiguration
Implements
IDisposable
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class LoggingVerbosityConfiguration : Object
Remarks

This class is not meant to be derived because it is heavyweight and therefore the number of instances should be minimal. To store context-sensitive information, another mechanism should be used.

Properties

Name Description
Backend

Gets the parent LoggingBackend.

IsDisposed

Determines whether the current LoggingVerbosityConfiguration has already been disposed.

IsEnabled

Determines whether the current LoggingBackend is currently enabled. This property has precedence over, and does not affect, the minimal log levels set through the SetLevel(LogLevel) method.

IsReadOnly

Determines whether the current instance is read-only. A LoggingVerbosityConfiguration is frozen when in starts being used by a LoggingContextLocalConfiguration.

Methods

Name Description
Dispose()
Dispose(Boolean)

Disposes the current object.

Finalize()

Destructor.

Freeze()

Prevents further modifications in the current object.

FromXml(XElement)

Sets the verbosities in this instance according to data from an XML file.

Reset()

Resets all settings to their default value (i.e. Debug level for everything).

SetMinimalLevel(LogLevel)

Sets the minimal LogLevel for all namespaces, types, and roles except system roles.

SetMinimalLevel(LogLevel, String)

Sets the minimal LogLevel for all namespaces and types for a specific role.

SetMinimalLevelForNamespace(LogLevel, String)

Sets the minimal LogLevel for a specific namespace and all roles except system roles.

SetMinimalLevelForNamespace(LogLevel, String, String)

Sets the minimal LogLevel for a specific namespace and role.

SetMinimalLevelForType(LogLevel, Type)

Sets the minimal LogLevel for a specific System.Type.

SetMinimalLevelForType(LogLevel, Type, String)

Sets the minimal LogLevel for a specific System.Type and role.

ToString()
Use()

Uses the current LoggingVerbosityConfiguration for the current execution context.