1. LoggerBase

Class LoggerBase

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Base implementation of ILogger.

The minimum log level is info by default.

Inheritance
System.Object
LoggerBase
Implements
Namespace: Stylelabs.M.Sdk.Models.Logging
Assembly: Stylelabs.M.Sdk.dll
Syntax
public abstract class LoggerBase : object, ILogger

Properties

IsDebugEnabled

Gets a value indicating whether debug-level logging is enabled.

Declaration
public bool IsDebugEnabled { get; }
Property Value
TypeDescription
System.Boolean

IsErrorEnabled

Gets a value indicating whether error-level logging is enabled.

Declaration
public bool IsErrorEnabled { get; }
Property Value
TypeDescription
System.Boolean

IsInfoEnabled

Gets a value indicating whether info-level logging is enabled.

Declaration
public bool IsInfoEnabled { get; }
Property Value
TypeDescription
System.Boolean

IsWarnEnabled

Gets a value indicating whether warning-level logging is enabled.

Declaration
public bool IsWarnEnabled { get; }
Property Value
TypeDescription
System.Boolean

MinimumLogLevel

Gets or sets the minimum enabled log level.

Declaration
public virtual LogLevel MinimumLogLevel { get; set; }
Property Value
TypeDescription
LogLevel

Methods

Debug(Func<String>)

Logs debug-level information.

Declaration
public void Debug(Func<string> message)
Parameters
TypeNameDescription
Func<System.String>message

Function that generates the log message.

Debug(String)

Logs debug-level information.

Declaration
public void Debug(string message)
Parameters
TypeNameDescription
System.Stringmessage

Message to log.

DebugAsync(Func<Task<String>>)

Async version of Debug(Func<String>).

Declaration
public Task DebugAsync(Func<Task<string>> message)
Parameters
TypeNameDescription
Func<Task<System.String>>message

Message to log.

Returns
TypeDescription
Task

A representing the asynchronous operation.

Error(Exception)

Logs error-level information.

Declaration
public void Error(Exception exception)
Parameters
TypeNameDescription
Exceptionexception

The exception that occurred.

Error(Func<String>, Exception)

Logs error-level information.

Declaration
public void Error(Func<string> message, Exception exception = null)
Parameters
TypeNameDescription
Func<System.String>message

Function that generates the log message.

Exceptionexception

The exception that occurred.

Error(String, Exception)

Logs error-level information.

Declaration
public void Error(string message, Exception exception = null)
Parameters
TypeNameDescription
System.Stringmessage

Message to log.

Exceptionexception

The exception that occurred.

ErrorAsync(Func<Task<String>>, Exception)

Async version of Error(Func<String>, Exception).

Declaration
public Task ErrorAsync(Func<Task<string>> message, Exception exception = null)
Parameters
TypeNameDescription
Func<Task<System.String>>message

Function that generates the log message.

Exceptionexception

The exception that occurred.

Returns
TypeDescription
Task

A representing the asynchronous operation.

Info(Func<String>)

Logs info-level information.

Declaration
public void Info(Func<string> message)
Parameters
TypeNameDescription
Func<System.String>message

Function that generates the log message.

Info(String)

Logs info-level information.

Declaration
public void Info(string message)
Parameters
TypeNameDescription
System.Stringmessage

Message to log.

InfoAsync(Func<Task<String>>)

Async version of Info(Func<String>).

Declaration
public Task InfoAsync(Func<Task<string>> message)
Parameters
TypeNameDescription
Func<Task<System.String>>message

Function that generates the log message.

Returns
TypeDescription
Task

A representing the asynchronous operation.

LogDebug(String)

Logs debug-level information.

Declaration
protected abstract void LogDebug(string message)
Parameters
TypeNameDescription
System.Stringmessage

The message to log.

LogError(Exception)

Logs error-level information.

Declaration
protected abstract void LogError(Exception exception)
Parameters
TypeNameDescription
Exceptionexception

The exception to log.

LogError(String, Exception)

Logs error-level information.

Declaration
protected abstract void LogError(string message, Exception exception = null)
Parameters
TypeNameDescription
System.Stringmessage

The message to log.

Exceptionexception

The exception to log.

LogInfo(String)

Logs info-level information.

Declaration
protected abstract void LogInfo(string message)
Parameters
TypeNameDescription
System.Stringmessage

The message to log.

LogWarn(String)

Logs warning-level information.

Declaration
protected abstract void LogWarn(string message)
Parameters
TypeNameDescription
System.Stringmessage

The message to log.

Warn(Func<String>)

Logs warning-level information.

Declaration
public void Warn(Func<string> message)
Parameters
TypeNameDescription
Func<System.String>message

Function that generates the log message.

Warn(String)

Logs warning-level information.

Declaration
public void Warn(string message)
Parameters
TypeNameDescription
System.Stringmessage

Message to log.

WarnAsync(Func<Task<String>>)

Async version of Warn(Func<String>).

Declaration
public Task WarnAsync(Func<Task<string>> message)
Parameters
TypeNameDescription
Func<Task<System.String>>message

Function that generates the log message.

Returns
TypeDescription
Task

A representing the asynchronous operation.

Events

OnLog

Declaration
public event EventHandler<LogEventArgs> OnLog
Event Type
TypeDescription
EventHandler<LogEventArgs>

Implements

この記事を改善するための提案がある場合は、 お知らせください!