PostSharp6.2/API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logger Class/Logger Methods/Logger.​Get­Logger Method/Logger.​Get­Logger Method (String)

Logger.GetLogger Method (String)

Note: This API is now obsolete.

Gets a Logger for a given role and for the calling type.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.2.13.0 (6.2.13.0)
Syntax
C#
[ObsoleteAttribute("Use the LogSource class with new developments. Disable the warning with #pragma for existing code.")]
public static Logger GetLogger(
	string role = "Custom"
)

Parameters

role (Optional)
Type: System.String
The role name (see LoggingRoles for a list of standard logging roles). The default value is Custom.

Return Value

Type: Logger
A Logger for role and the calling type.
See Also