Class LoggingExtensions
Provides extension methods for logging.
Inherited Members
Namespace: DevToys.Api
Assembly: DevToys.Api.dll
Syntax
public static class LoggingExtensions
Properties
LoggerFactory
Sets the ILoggerFactory.
Declaration
public static ILoggerFactory LoggerFactory { set; }
Property Value
Type | Description |
---|---|
ILoggerFactory |
Methods
Log(Type)
Creates an instance of ILogger for the specified type.
Declaration
public static ILogger Log(this Type forType)
Parameters
Type | Name | Description |
---|---|---|
Type | forType | The type to create the logger for. |
Returns
Type | Description |
---|---|
ILogger | An instance of ILogger. |
Log<T>(T)
Creates an instance of ILogger for the given object's type.
Declaration
public static ILogger Log<T>(this T instance)
Parameters
Type | Name | Description |
---|---|---|
T | instance | The object instance. |
Returns
Type | Description |
---|---|
ILogger | An instance of ILogger. |
Type Parameters
Name | Description |
---|---|
T | The type of the object. |