Class LoggerExtensions
- Namespace
- Stride.Core.Diagnostics
- Assembly
- Stride.Core.dll
Extensions for ILogger.
public static class LoggerExtensions
- Inheritance
-
LoggerExtensions
Methods
Debug(ILogger, string, CallerInfo)
Logs the specified debug message.
public static void Debug(this ILogger logger, string message, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe debug message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Debug(ILogger, string, Exception, CallerInfo)
Logs the specified debug message with an exception.
public static void Debug(this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe debug message.
exception
ExceptionAn exception to log with the message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Error(ILogger, string, CallerInfo)
Logs the specified error message.
public static void Error(this ILogger logger, string message, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe error message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Error(ILogger, string, Exception, CallerInfo)
Logs the specified error message with an exception.
public static void Error(this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe error message.
exception
ExceptionAn exception to log with the message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Fatal(ILogger, string, CallerInfo)
Logs the specified fatal message.
public static void Fatal(this ILogger logger, string message, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe fatal message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Fatal(ILogger, string, Exception, CallerInfo)
Logs the specified fatal message with an exception.
public static void Fatal(this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe fatal message.
exception
ExceptionAn exception to log with the message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Info(ILogger, string, CallerInfo)
Logs the specified info message.
public static void Info(this ILogger logger, string message, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe info message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Info(ILogger, string, Exception, CallerInfo)
Logs the specified info message with an exception.
public static void Info(this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe info message.
exception
ExceptionAn exception to log with the message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Verbose(ILogger, string, CallerInfo)
Logs the specified verbose message.
public static void Verbose(this ILogger logger, string message, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe verbose message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Verbose(ILogger, string, Exception, CallerInfo)
Logs the specified verbose message with an exception.
public static void Verbose(this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe verbose message.
exception
ExceptionAn exception to log with the message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Warning(ILogger, string, CallerInfo)
Logs the specified warning message.
public static void Warning(this ILogger logger, string message, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe warning message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).
Warning(ILogger, string, Exception, CallerInfo)
Logs the specified warning message with an exception.
public static void Warning(this ILogger logger, string message, Exception exception, CallerInfo callerInfo = null)
Parameters
logger
ILoggerThe logger.
message
stringThe warning message.
exception
ExceptionAn exception to log with the message.
callerInfo
CallerInfoInformation about the caller. Default is null, otherwise use Get(string, string, int).