PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​CustomILogger­Factory3Get­Logger
Open sandboxFocus

ILoggerFactory3.GetLogger Method

GetLogger(Type)

Gets an instance of the ILogger3 for a specific System.Type.

Declaration
ILogger3 GetLogger(Type type)
Parameters
Type Name Description
System.Type type

The type of the source code that will emit the records.

Returns
Type Description
ILogger3

An instance of the ILogger2 interface for type.

GetLogger(String)

Gets an instance of the ILogger2 interface for a specific sourceName. The name will usually, but not always, be a type name.

Declaration
ILogger3 GetLogger(string sourceName)
Parameters
Type Name Description
System.String sourceName

Name identifying the returned logger. The backend creates a logger based on this name.

Returns
Type Description
ILogger3