Class LoggerBase
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
Base implementation of ILogger.
The minimum log level is info by default.
Implements
Namespace: Stylelabs.M.Sdk.Models.Logging
Assembly: Stylelabs.M.Sdk.dll
Syntax
Properties
IsDebugEnabled
Gets a value indicating whether debug-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsErrorEnabled
Gets a value indicating whether error-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsInfoEnabled
Gets a value indicating whether info-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsWarnEnabled
Gets a value indicating whether warning-level logging is enabled.
Declaration
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MinimumLogLevel
Gets or sets the minimum enabled log level.
Declaration
Property Value
| Type | Description |
|---|---|
| LogLevel |
Methods
Debug(Func<String>)
Logs debug-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<System.String> | message |
Function that generates the log message. |
Debug(String)
Logs debug-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
Message to log. |
DebugAsync(Func<Task<String>>)
Async version of Debug(Func<String>).
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task<System.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<String>, Exception)
Logs error-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<System.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 |
|---|---|---|
| System.String | message |
Message to log. |
| Exception | exception |
The exception that occurred. |
ErrorAsync(Func<Task<String>>, Exception)
Async version of Error(Func<String>, Exception).
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task<System.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<String>)
Logs info-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<System.String> | message |
Function that generates the log message. |
Info(String)
Logs info-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
Message to log. |
InfoAsync(Func<Task<String>>)
Async version of Info(Func<String>).
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task<System.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 |
|---|---|---|
| System.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 |
|---|---|---|
| System.String | message |
The message to log. |
| Exception | exception |
The exception to log. |
LogInfo(String)
Logs info-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
The message to log. |
LogWarn(String)
Logs warning-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
The message to log. |
Warn(Func<String>)
Logs warning-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<System.String> | message |
Function that generates the log message. |
Warn(String)
Logs warning-level information.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message |
Message to log. |
WarnAsync(Func<Task<String>>)
Async version of Warn(Func<String>).
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task<System.String>> | message |
Function that generates the log message. |
Returns
| Type | Description |
|---|---|
| Task |
A representing the asynchronous operation. |
Events
OnLog
Declaration
Event Type
| Type | Description |
|---|---|
| EventHandler<LogEventArgs> |