Allows to enable or disable logging for a specific type and exposes some information regarding the verbosity for this type. Note that a type here does not need to map to a .NET type. It can be an arbitrary dot-separated string.
Inheritance
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public abstract class LoggingTypeSource : LoggingNamespaceSource, IContextLocalLogger, ILoggerExceptionHandler
Constructors
Name | Description |
---|---|
LoggingTypeSource(LoggingNamespaceSource, string, Type) | Creates an instance of LoggingTypeSource. |
LoggingTypeSource(LoggingNamespaceSource, Type) | Creates an instance of LoggingTypeSource. |
Properties
Name | Description |
---|---|
GenericParameterCount | Gets the number of generic parameters in the type. |
Options | Gets the LoggingRoleConfiguration for the current role. This property is a shortcut to |
SourceType | The type represented by the current LoggingTypeSource. This may be null if the log source is based on a name rather than on a type. |
Methods
Name | Description |
---|---|
Clone(string) | Returns a deep clone of the current object. |
IsBackendEnabled(LogLevel) | Checks whether logging is enabled in the back-end for the given level. |
IsEnabled(LogLevel) | Determines whether logging is enabled for the given LogLevel. |
Refresh() | Refreshes the logging level from the back-end from the current node and all children nodes. The back-end-defined logging level is cached for performance reasons. |