ILoggerService
Wisej.AI.Services.ILoggerService
Last updated
Wisej.AI.Services.ILoggerService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Defines a contract for logging services that support logging messages with a specified trace level and optional formatting arguments.
Implementations of this interface should provide a mechanism for logging messages that include a specified and a message string. The message can include formatting placeholders that are replaced by the provided arguments. This interface is typically used in applications that require logging capabilities to track the flow of execution and capture debugging information.
Logs a message with a specified trace level and optional formatting arguments.
level
context
A string representing the name of the class and the method that called the logger.
message
The message to log. This may contain format placeholders.
arguments
Optional. An array of objects to format into the message. Default is an empty array.
This method allows the caller to log a message at a specified trace level. The message may include placeholders that will be replaced by the provided arguments. Example usage:
The method should handle any necessary formatting of the message string with the arguments provided and then record the log entry with the appropriate trace level.
Logs an exception with a specified trace level.
level
context
A string representing the name of the class and the method that called the logger.
exception
The exception to be logged, which provides the message and stack trace.
This method is designed to log exceptions at a specified trace level, capturing the exception's message and stack trace. Example usage:
This method simplifies the process of logging exceptions by automatically including essential details such as the exception message and stack trace.
The indicating the severity of the log message.
The indicating the severity of the log message.
Provides a default implementation of the for logging messages and exceptions.