GetSource(string, Type)
Returns a LoggingTypeSource for the given role and type.
Declaration
[Obsolete("Use LoggingBackend.DefaultContextLocalConfiguration.Verbosity")]
public static LoggingTypeSource GetSource(string role, Type type)Parameters
| Type | Name | Description |
|---|---|---|
| string | role | The role. Typically one of the constants of the LoggingRoles type, or a custom role. |
| Type | type | The type. |
Returns
| Type | Description |
|---|---|
| LoggingTypeSource | The LoggingTypeSource for |
Remarks
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.
GetSource(string, string)
Returns a LoggingNamespaceSource for the given role and, optionally, namespace.
Declaration
[Obsolete("Use LoggingBackend.DefaultContextLocalConfiguration.Verbosity")]
public static LoggingNamespaceSource GetSource(string role, string ns = null)Parameters
| Type | Name | Description |
|---|---|---|
| string | role | The role. Typically one of the constants of the LoggingRoles type, or a custom role. |
| string | ns | The namespace for which the LoggingNamespaceSource is requested, or |
Returns
| Type | Description |
|---|---|
| LoggingNamespaceSource | The LoggingNamespaceSource for |
Remarks
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.