Table of Contents

Class DiagnosticChannelLoggingExtensions

Namespace
Chronicler.Diagnostics
Assembly
Chronicler.Diagnostics.dll

Provides string and interpolated diagnostic logging helpers for DiagnosticChannel.

public static class DiagnosticChannelLoggingExtensions
Inheritance
DiagnosticChannelLoggingExtensions
Inherited Members

Methods

Error(DiagnosticChannel, DiagnosticMessageHandler<ErrorDiagnosticLevel>, string, string, string)

Writes an error diagnostic message without evaluating formatted expressions when error diagnostics are disabled.

public static void Error(this DiagnosticChannel channel, DiagnosticMessageHandler<ErrorDiagnosticLevel> message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

message DiagnosticMessageHandler<ErrorDiagnosticLevel>

The interpolated diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Error(DiagnosticChannel, string, string, string, string)

Writes an already formatted error message when error diagnostics are enabled.

public static void Error(this DiagnosticChannel channel, string message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

message string

The already formatted diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Info(DiagnosticChannel, DiagnosticMessageHandler<InfoDiagnosticLevel>, string, string, string)

Writes an info diagnostic message without evaluating formatted expressions when info diagnostics are disabled.

public static void Info(this DiagnosticChannel channel, DiagnosticMessageHandler<InfoDiagnosticLevel> message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

message DiagnosticMessageHandler<InfoDiagnosticLevel>

The interpolated diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Info(DiagnosticChannel, string, string, string, string)

Writes an already formatted info message when info diagnostics are enabled.

public static void Info(this DiagnosticChannel channel, string message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

message string

The already formatted diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Log(DiagnosticChannel, DiagnosticLevel, DiagnosticMessageHandler<DynamicDiagnosticLevel>, string, string, string)

Writes a dynamic-level diagnostic message without evaluating formatted expressions when the level is disabled.

public static void Log(this DiagnosticChannel channel, DiagnosticLevel level, DiagnosticMessageHandler<DynamicDiagnosticLevel> message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

level DiagnosticLevel

The severity level of the diagnostic event.

message DiagnosticMessageHandler<DynamicDiagnosticLevel>

The interpolated diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Log(DiagnosticChannel, DiagnosticLevel, string, string, string, string)

Writes an already formatted message when the requested diagnostic level is enabled.

public static void Log(this DiagnosticChannel channel, DiagnosticLevel level, string message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

level DiagnosticLevel

The severity level of the diagnostic event.

message string

The already formatted diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Warn(DiagnosticChannel, DiagnosticMessageHandler<WarningDiagnosticLevel>, string, string, string)

Writes a warning diagnostic message without evaluating formatted expressions when warning diagnostics are disabled.

public static void Warn(this DiagnosticChannel channel, DiagnosticMessageHandler<WarningDiagnosticLevel> message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

message DiagnosticMessageHandler<WarningDiagnosticLevel>

The interpolated diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.

Warn(DiagnosticChannel, string, string, string, string)

Writes an already formatted warning message when warning diagnostics are enabled.

public static void Warn(this DiagnosticChannel channel, string message, string source = "", string method = "", string filePath = "")

Parameters

channel DiagnosticChannel

The diagnostic channel that receives the message.

message string

The already formatted diagnostic message.

source string

An optional source identifier. When omitted, caller information is used.

method string

The calling method name, automatically captured.

filePath string

The calling file name, automatically captured to get the class name.