PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / ILogger­Factory Interface / ILogger­Factory Methods / ILogger­Factory.​Get­Logger Method

ILoggerFactory.GetLogger Method

Gets an instance of the ILogger interface for a given role and Type.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
ILogger GetLogger(
	string role,
	Type type
)

Parameters

role
Type: System.String
The role for which the logger is requested.
type
Type: System.Type
The type of the source code that will emit the records.

Return Value

Type: ILogger
An instance of the ILogger interface for role and type.
See Also