Open sandboxFocus

Method GetLogger

GetLogger(string, Type)

Gets a Logger for a given role and Type.

Declaration
[Obsolete("Use the LogSource class with new developments. Disable the warning with #pragma for existing code.")]
public static Logger GetLogger(string role, Type type)
Parameters
Type Name Description
string role

The role name (see LoggingRoles for a list of standard logging roles).

Type type

The type that will emit the records.

Returns
Type Description
Logger

A Logger for role and type.

GetLogger(string)

Gets a Logger for a given role and for the calling type.

Declaration
[Obsolete("Use the LogSource class with new developments. Disable the warning with #pragma for existing code.")]
public static Logger GetLogger(string role = "Custom")
Parameters
Type Name Description
string role

The role name (see LoggingRoles for a list of standard logging roles). The default value is Custom.

Returns
Type Description
Logger

A Logger for role and the calling type.