GetLogSource(ILoggerFactory2, Type)
Declaration
[Obsolete("Provide an ILoggerFactory3.")]
public static LogSource GetLogSource(this ILoggerFactory2 factory, Type type)Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory2 | factory | An ILoggerFactory. |
| Type | type | The type that will emit the records. |
Returns
| Type | Description |
|---|---|
| LogSource | A LogSource for |
GetLogSource(ILoggerFactory3, Type)
Declaration
public static LogSource GetLogSource(this ILoggerFactory3 factory, Type type)Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory3 | factory | An ILoggerFactory. |
| Type | type | The type that will emit the records. |
Returns
| Type | Description |
|---|---|
| LogSource | A LogSource for |
GetLogSource(ILoggerFactory3, string)
Gets a LogSource for a given role and sourceName.
Declaration
public static LogSource GetLogSource(this ILoggerFactory3 factory, string sourceName)Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory3 | factory | An ILoggerFactory3. |
| string | sourceName | Log source name to be used by the backend. Not all backends support creating sources by name. |
Returns
| Type | Description |
|---|---|
| LogSource | A LogSource for |
GetLogSource(ILoggerFactory2)
Gets a Logger for a given role and for the calling type.
Declaration
[Obsolete("Provide an ILoggerFactory3.")]
public static LogSource GetLogSource(this ILoggerFactory2 factory)Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory2 | factory | An ILoggerFactory. |
Returns
| Type | Description |
|---|---|
| LogSource | A Logger for the calling type. |
GetLogSource(ILoggerFactory3)
Gets a Logger for a given role and for the calling type.
Declaration
public static LogSource GetLogSource(this ILoggerFactory3 factory)Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory3 | factory | An ILoggerFactory. |
Returns
| Type | Description |
|---|---|
| LogSource | A Logger for the calling type. |