PostSharp 2023.0 / / Post­Sharp Documentation / 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: 2023.0.3.0 (2023.0.3.0)
[ObsoleteAttribute("Use the LogSource class with new developments. Disable the warning with #pragma for existing code.")]
public static Logger GetLogger(
	string role = "Custom"


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