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
System.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
System.String sourceName

The source name. A dotted name.

System.String role

A role name. See LoggingRoles.

Returns
Type Description
LogSource

Get(Type, String)

Gets a log source for a specified role and System.Type.

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

The type.

System.String role

See LoggingRoles.

Returns
Type Description
LogSource