Table of Contents

Class KEFCoreLoggerExtensions

Namespace
MASES.EntityFrameworkCore.KNet.Extensions
Assembly
MASES.EntityFrameworkCore.KNet.dll

KEFCore specific extension methods for IDiagnosticsLogger and ILogger

public static class KEFCoreLoggerExtensions
Inheritance
KEFCoreLoggerExtensions
Inherited Members

Methods

CheckAndLogCritical(IDiagnosticsLogger, string, Exception, string?, params object?[])

Formats and writes a critical log message.

public static void CheckAndLogCritical(this IDiagnosticsLogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogCritical(exception, "Error while processing request from {Address}", address)

CheckAndLogCritical(IDiagnosticsLogger, string, string?, params object?[])

Formats and writes a critical log message.

public static void CheckAndLogCritical(this IDiagnosticsLogger logger, string callSite, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogCritical("Processing request from {Address}", address)

CheckAndLogCritical(ILogger, string, Exception, string?, params object?[])

Formats and writes a critical log message.

public static void CheckAndLogCritical(this ILogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogCritical(exception, "Error while processing request from {Address}", address)

CheckAndLogCritical(ILogger, string, string?, params object?[])

Formats and writes a critical log message.

public static void CheckAndLogCritical(this ILogger logger, string callSite, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogCritical("Processing request from {Address}", address)

CheckAndLogDebug(IDiagnosticsLogger, string, Exception, string?, params object?[])

Formats and writes a debug log message.

public static void CheckAndLogDebug(this IDiagnosticsLogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogDebug(exception, "Error while processing request from {Address}", address)

CheckAndLogDebug(IDiagnosticsLogger, string, string?, params object?[])

Formats and writes a debug log message.

public static void CheckAndLogDebug(this IDiagnosticsLogger logger, string callSite, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogDebug("Processing request from {Address}", address)

CheckAndLogDebug(ILogger, string, Exception, string?, params object?[])

Formats and writes a debug log message.

public static void CheckAndLogDebug(this ILogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogDebug(exception, "Error while processing request from {Address}", address)

CheckAndLogDebug(ILogger, string, string?, params object?[])

Formats and writes a debug log message.

public static void CheckAndLogDebug(this ILogger logger, string callSite, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogDebug("Processing request from {Address}", address)

CheckAndLogError(IDiagnosticsLogger, string, Exception, string?, params object?[])

Formats and writes an error log message.

public static void CheckAndLogError(this IDiagnosticsLogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogError(exception, "Error while processing request from {Address}", address)

CheckAndLogError(IDiagnosticsLogger, string, string?, params object?[])

Formats and writes an error log message.

public static void CheckAndLogError(this IDiagnosticsLogger logger, string callSite, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogError("Processing request from {Address}", address)

CheckAndLogError(ILogger, string, Exception, string?, params object?[])

Formats and writes an error log message.

public static void CheckAndLogError(this ILogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogError(exception, "Error while processing request from {Address}", address)

CheckAndLogError(ILogger, string, string?, params object?[])

Formats and writes an error log message.

public static void CheckAndLogError(this ILogger logger, string callSite, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogError("Processing request from {Address}", address)

CheckAndLogInformation(IDiagnosticsLogger, string, Exception, string?, params object?[])

Formats and writes an informational log message.

public static void CheckAndLogInformation(this IDiagnosticsLogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogInformation(exception, "Error while processing request from {Address}", address)

CheckAndLogInformation(IDiagnosticsLogger, string, string?, params object?[])

Formats and writes an informational log message.

public static void CheckAndLogInformation(this IDiagnosticsLogger logger, string callSite, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogInformation("Processing request from {Address}", address)

CheckAndLogInformation(ILogger, string, Exception, string?, params object?[])

Formats and writes an informational log message.

public static void CheckAndLogInformation(this ILogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogInformation(exception, "Error while processing request from {Address}", address)

CheckAndLogInformation(ILogger, string, string?, params object?[])

Formats and writes an informational log message.

public static void CheckAndLogInformation(this ILogger logger, string callSite, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogInformation("Processing request from {Address}", address)

CheckAndLogTrace(IDiagnosticsLogger, string, Exception, string?, params object?[])

Formats and writes a trace log message.

public static void CheckAndLogTrace(this IDiagnosticsLogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogTrace(exception, "Error while processing request from {Address}", address)

CheckAndLogTrace(IDiagnosticsLogger, string, string?, params object?[])

Formats and writes a trace log message.

public static void CheckAndLogTrace(this IDiagnosticsLogger logger, string callSite, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogTrace("Processing request from {Address}", address)

CheckAndLogTrace(ILogger, string, Exception, string?, params object?[])

Formats and writes a trace log message.

public static void CheckAndLogTrace(this ILogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogTrace(exception, "Error while processing request from {Address}", address)

CheckAndLogTrace(ILogger, string, string?, params object?[])

Formats and writes a trace log message.

public static void CheckAndLogTrace(this ILogger logger, string callSite, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogTrace("Processing request from {Address}", address)

CheckAndLogWarning(IDiagnosticsLogger, string, Exception, string?, params object?[])

Formats and writes a warning log message.

public static void CheckAndLogWarning(this IDiagnosticsLogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogWarning(exception, "Error while processing request from {Address}", address)

CheckAndLogWarning(IDiagnosticsLogger, string, string?, params object?[])

Formats and writes a warning log message.

public static void CheckAndLogWarning(this IDiagnosticsLogger logger, string callSite, string? message, params object?[] args)

Parameters

logger IDiagnosticsLogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogWarning("Processing request from {Address}", address)

CheckAndLogWarning(ILogger, string, Exception, string?, params object?[])

Formats and writes a warning log message.

public static void CheckAndLogWarning(this ILogger logger, string callSite, Exception exception, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
exception Exception

The exception to log.

message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogWarning(exception, "Error while processing request from {Address}", address)

CheckAndLogWarning(ILogger, string, string?, params object?[])

Formats and writes a warning log message.

public static void CheckAndLogWarning(this ILogger logger, string callSite, string? message, params object?[] args)

Parameters

logger ILogger

The ILogger to write to.

callSite string
message string

Format string of the log message in message template format. Example: "User {User} logged in from {Address}"

args object[]

An object array that contains zero or more objects to format.

Examples

logger.LogWarning("Processing request from {Address}", address)