LoggingServices.GetSource Method (String, Type) |
Note: This API is now obsolete.
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.10.10.0 (6.10.10.0)
[ObsoleteAttribute("Use LoggingBackend.DefaultContextLocalConfiguration.Verbosity")] public static LoggingTypeSource GetSource( string role, Type type )
Parameters
- role
- Type: System.String
The role. Typically one of the constants of the LoggingRoles type, or a custom role. - type
- Type: System.Type
The type.
Return Value
Type: LoggingTypeSourceThe LoggingTypeSource for role and type. If no LoggingTypeSource exists for this role and type, this method shall create a new LoggingTypeSource.
This method returns a LoggingTypeSource for the LoggingBackend currently configured for the given role. Instances of the LoggingTypeSource classes are not shared by different instances of the LoggingBackend class, however several roles can share the same LoggingBackend instance. Therefore, you should configure a LoggingTypeSource after, and not before, assigning a LoggingBackend to the DefaultBackend property or a LoggingRoleConfiguration.