PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace / Logger Class / Logger Methods / Logger.​Get­Logger Method / Logger.​Get­Logger Method (String, Type)

Logger.GetLogger Method (String, Type)

Note: This API is now obsolete.

Gets a Logger for a given role and Type.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.11.0 (6.9.11.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,
	Type type
)

Parameters

role
Type: System.String
The role name (see LoggingRoles for a list of standard logging roles).
type
Type: System.Type
The type that will emit the records.

Return Value

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