Table of Contents

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 ILogger

The logger.

message string

The debug message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The debug message.

exception Exception

An exception to log with the message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The error message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The error message.

exception Exception

An exception to log with the message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The fatal message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The fatal message.

exception Exception

An exception to log with the message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The info message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The info message.

exception Exception

An exception to log with the message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The verbose message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The verbose message.

exception Exception

An exception to log with the message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The warning message.

callerInfo CallerInfo

Information 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 ILogger

The logger.

message string

The warning message.

exception Exception

An exception to log with the message.

callerInfo CallerInfo

Information about the caller. Default is null, otherwise use Get(string, string, int).