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
channelDiagnosticChannelThe diagnostic channel that receives the message.
messageDiagnosticMessageHandler<ErrorDiagnosticLevel>The interpolated diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
messagestringThe already formatted diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
messageDiagnosticMessageHandler<InfoDiagnosticLevel>The interpolated diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
messagestringThe already formatted diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
levelDiagnosticLevelThe severity level of the diagnostic event.
messageDiagnosticMessageHandler<DynamicDiagnosticLevel>The interpolated diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
levelDiagnosticLevelThe severity level of the diagnostic event.
messagestringThe already formatted diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
messageDiagnosticMessageHandler<WarningDiagnosticLevel>The interpolated diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe 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
channelDiagnosticChannelThe diagnostic channel that receives the message.
messagestringThe already formatted diagnostic message.
sourcestringAn optional source identifier. When omitted, caller information is used.
methodstringThe calling method name, automatically captured.
filePathstringThe calling file name, automatically captured to get the class name.