Class LoggerBase
Base implementation of ILogger.
The minimum log level is info by default.
Inheritance
object
LoggerBase
Implements
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsLogging
Assembly: Stylelabs.M.Sdk.dll
Syntax
Properties
IsDebugEnabled
Gets a value indicating whether debug-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| bool |
IsErrorEnabled
Gets a value indicating whether error-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| bool |
IsInfoEnabled
Gets a value indicating whether info-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| bool |
IsWarnEnabled
Gets a value indicating whether warning-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| bool |
MinimumLogLevel
Gets or sets the minimum enabled log level.
Declaration
Property Value
| Type | Description |
|---|---|
| LogLevel |
Methods
Debug(Func)
Logs debug-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>string | message | Function that generates the log message. |
Debug(string)
Logs debug-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Message to log. |
DebugAsync(Func<Task>)
Async version of Debug(Func
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>Task<>string | message | Message to log. |
Returns
| Type | Description |
|---|---|
| Task | A representing the asynchronous operation. |
Error(Exception)
Logs error-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | The exception that occurred. |
Error(Func, Exception)
Logs error-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>string | message | Function that generates the log message. |
| Exception | exception | The exception that occurred. |
Error(string, Exception)
Logs error-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Message to log. |
| Exception | exception | The exception that occurred. |
ErrorAsync(Func<Task>, Exception)
Async version of Error(Func
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>Task<>string | message | Function that generates the log message. |
| Exception | exception | The exception that occurred. |
Returns
| Type | Description |
|---|---|
| Task | A representing the asynchronous operation. |
Info(Func)
Logs info-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>string | message | Function that generates the log message. |
Info(string)
Logs info-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Message to log. |
InfoAsync(Func<Task>)
Async version of Info(Func
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>Task<>string | message | Function that generates the log message. |
Returns
| Type | Description |
|---|---|
| Task | A representing the asynchronous operation. |
LogDebug(string)
Logs debug-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to log. |
LogError(Exception)
Logs error-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | The exception to log. |
LogError(string, Exception)
Logs error-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to log. |
| Exception | exception | The exception to log. |
LogInfo(string)
Logs info-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to log. |
LogWarn(string)
Logs warning-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message to log. |
Warn(Func)
Logs warning-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>string | message | Function that generates the log message. |
Warn(string)
Logs warning-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Message to log. |
WarnAsync(Func<Task>)
Async version of Warn(Func
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<>Task<>string | message | Function that generates the log message. |
Returns
| Type | Description |
|---|---|
| Task | A representing the asynchronous operation. |
Events
OnLog
Fires an event just before something is about to be logged.
Declaration
Event Type
| Type | Description |
|---|---|
| EventHandler<>LogEventArgs |