LoggingServices.GetSource Method (String, String) |
Note: This API is now obsolete.
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.5.21.0 (6.5.21.0)
[ObsoleteAttribute("Use LoggingBackend.DefaultContextLocalConfiguration.Verbosity")] public static LoggingNamespaceSource GetSource( string role, string ns = null )
Parameters
- role
- Type: System.String
The role. Typically one of the constants of the LoggingRoles type, or a custom role. - ns (Optional)
- Type: System.String
The namespace for which the LoggingNamespaceSource is requested, or null if the LoggingNamespaceSource is requested for the root namespace.
Return Value
Type: LoggingNamespaceSourceThe LoggingNamespaceSource for role and ns. If no LoggingNamespaceSource exists for this role and type, this method shall create a new LoggingNamespaceSource.
This method returns a LoggingNamespaceSource for the LoggingBackend currently configured for the given role. Instances of the LoggingNamespaceSource 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 LoggingNamespaceSource after, and not before, assigning a LoggingBackend to the DefaultBackend property or a LoggingRoleConfiguration.