PostSharpAPI ReferencePost­Sharp.​Patterns.​DiagnosticsLog­SourceGet
Open sandboxFocus

LogSource.Get Method

Get()

Gets a LogSource for the calling type.

Declaration
public static LogSource Get()
Returns
Type Description
LogSource

A LogSource for the calling type.

Get(ref CallerInfo)

Declaration
public static LogSource Get(ref CallerInfo callerInfo)
Parameters
Type Name Description
CallerInfo callerInfo
Returns
Type Description
LogSource

Get(String)

Gets a log source associated with a specific source name.

Declaration
public static LogSource Get(string sourceName)
Parameters
Type Name Description
String sourceName

Name that the logging backend associates with a log source.

Returns
Type Description
LogSource

Get(String, String)

Gets a log source for a specified role and source name.

Declaration
public static LogSource Get(string sourceName, string role = null)
Parameters
Type Name Description
String sourceName

The source name. A dotted name.

String role

A role name. See LoggingRoles.

Returns
Type Description
LogSource

Get(Type, String)

Gets a log source for a specified role and Type.

Declaration
public static LogSource Get(Type type, string role = null)
Parameters
Type Name Description
Type type

The type.

String role

See LoggingRoles.

Returns
Type Description
LogSource