<PackageReference Include="NLog" Version="6.1.2" />

NLog.Common.InternalLogger

public static class InternalLogger
NLog internal logger. Writes to file, console or custom text writer (see LogWriter)
public static bool IncludeTimestamp { get; set; }

Gets or sets a value indicating whether timestamp should be included in internal log output.

public static bool IsDebugEnabled { get; }

Gets a value indicating whether internal log includes Debug messages.

public static bool IsErrorEnabled { get; }

Gets a value indicating whether internal log includes Error messages.

public static bool IsFatalEnabled { get; }

Gets a value indicating whether internal log includes Fatal messages.

public static bool IsInfoEnabled { get; }

Gets a value indicating whether internal log includes Info messages.

public static bool IsTraceEnabled { get; }

Gets a value indicating whether internal log includes Trace messages.

public static bool IsWarnEnabled { get; }

Gets a value indicating whether internal log includes Warn messages.

public static string LogFile { get; set; }

Gets or sets the file path of the internal log file. Supports environment variables like %APPDATA% or %LOCALAPPDATA% or %PROGRAMDATA%, and selected NLog-variables like ${basedir}, ${processdir}, ${currentdir}.

public static LogLevel LogLevel { get; set; }

Gets or sets the minimal internal log level.

public static bool LogToConsole { get; set; }

Gets or sets a value indicating whether internal messages should be written to the console output stream.

public static bool LogToConsoleError { get; set; }

Gets or sets a value indicating whether internal messages should be written to the console error stream.

public static TextWriter LogWriter { get; set; }

Gets or sets the text writer that will receive internal logs.

Internal LogEvent written to the InternalLogger

public static void Debug(string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the Debug level.

public static void Debug(Exception ex, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the Debug level.

public static void Debug(string message, object[] args)

Logs the specified message without an Exception at the Debug level.

public static void Debug(string message)

Logs the specified message without an Exception at the Debug level.

public static void Debug(Func<string> messageFunc)

Logs the specified message without an Exception at the Debug level. messageFunc will be only called when logging is enabled for level Debug.

public static void Debug(Exception ex, string message, object[] args)

Logs the specified message with an Exception at the Debug level.

public static void Debug<TArgument1>(string message, TArgument1 arg0)

Logs the specified message without an Exception at the Trace level.

public static void Debug<TArgument1, TArgument2>(string message, TArgument1 arg0, TArgument2 arg1)

Logs the specified message without an Exception at the Trace level.

public static void Debug<TArgument1, TArgument2, TArgument3>(string message, TArgument1 arg0, TArgument2 arg1, TArgument3 arg2)

Logs the specified message without an Exception at the Trace level.

public static void Debug(Exception ex, string message)

Logs the specified message with an Exception at the Debug level.

public static void Debug(Exception ex, Func<string> messageFunc)

Logs the specified message with an Exception at the Debug level. messageFunc will be only called when logging is enabled for level Debug.

public static void Error(string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the Error level.

public static void Error(Exception ex, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the Error level.

public static void Error(string message, object[] args)

Logs the specified message without an Exception at the Error level.

public static void Error(string message)

Logs the specified message without an Exception at the Error level.

public static void Error(Func<string> messageFunc)

Logs the specified message without an Exception at the Error level. messageFunc will be only called when logging is enabled for level Error.

public static void Error(Exception ex, string message, object[] args)

Logs the specified message with an Exception at the Error level.

public static void Error<TArgument1>(string message, TArgument1 arg0)

Logs the specified message without an Exception at the Trace level.

public static void Error<TArgument1, TArgument2>(string message, TArgument1 arg0, TArgument2 arg1)

Logs the specified message without an Exception at the Trace level.

public static void Error<TArgument1, TArgument2, TArgument3>(string message, TArgument1 arg0, TArgument2 arg1, TArgument3 arg2)

Logs the specified message without an Exception at the Trace level.

public static void Error(Exception ex, string message)

Logs the specified message with an Exception at the Error level.

public static void Error(Exception ex, Func<string> messageFunc)

Logs the specified message with an Exception at the Error level. messageFunc will be only called when logging is enabled for level Error.

public static void Fatal(string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the Fatal level.

public static void Fatal(Exception ex, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the Fatal level.

public static void Fatal(string message, object[] args)

Logs the specified message without an Exception at the Fatal level.

public static void Fatal(string message)

Logs the specified message without an Exception at the Fatal level.

public static void Fatal(Func<string> messageFunc)

Logs the specified message without an Exception at the Fatal level. messageFunc will be only called when logging is enabled for level Fatal.

public static void Fatal(Exception ex, string message, object[] args)

Logs the specified message with an Exception at the Fatal level.

public static void Fatal<TArgument1>(string message, TArgument1 arg0)

Logs the specified message without an Exception at the Trace level.

public static void Fatal<TArgument1, TArgument2>(string message, TArgument1 arg0, TArgument2 arg1)

Logs the specified message without an Exception at the Trace level.

public static void Fatal<TArgument1, TArgument2, TArgument3>(string message, TArgument1 arg0, TArgument2 arg1, TArgument3 arg2)

Logs the specified message without an Exception at the Trace level.

public static void Fatal(Exception ex, string message)

Logs the specified message with an Exception at the Fatal level.

public static void Fatal(Exception ex, Func<string> messageFunc)

Logs the specified message with an Exception at the Fatal level. messageFunc will be only called when logging is enabled for level Fatal.

public static void Info(string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the Info level.

public static void Info(Exception ex, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the Info level.

public static void Info(string message, object[] args)

Logs the specified message without an Exception at the Info level.

public static void Info(string message)

Logs the specified message without an Exception at the Info level.

public static void Info(Func<string> messageFunc)

Logs the specified message without an Exception at the Info level. messageFunc will be only called when logging is enabled for level Info.

public static void Info(Exception ex, string message, object[] args)

Logs the specified message with an Exception at the Info level.

public static void Info<TArgument1>(string message, TArgument1 arg0)

Logs the specified message without an Exception at the Trace level.

public static void Info<TArgument1, TArgument2>(string message, TArgument1 arg0, TArgument2 arg1)

Logs the specified message without an Exception at the Trace level.

public static void Info<TArgument1, TArgument2, TArgument3>(string message, TArgument1 arg0, TArgument2 arg1, TArgument3 arg2)

Logs the specified message without an Exception at the Trace level.

public static void Info(Exception ex, string message)

Logs the specified message with an Exception at the Info level.

public static void Info(Exception ex, Func<string> messageFunc)

Logs the specified message with an Exception at the Info level. messageFunc will be only called when logging is enabled for level Info.

public static void Log(LogLevel level, string message, object[] args)

Logs the specified message without an Exception at the specified level.

public static void Log(LogLevel level, string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the specified level.

public static void Log(Exception ex, LogLevel level, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the specified level.

public static void Log(LogLevel level, string message)

Logs the specified message without an Exception at the specified level.

public static void Log(LogLevel level, Func<string> messageFunc)

Logs the specified message without an Exception at the specified level. messageFunc will be only called when logging is enabled for level level.

public static void Log(Exception ex, LogLevel level, Func<string> messageFunc)

Logs the specified message with an Exception at the specified level. messageFunc will be only called when logging is enabled for level level.

public static void Log(Exception ex, LogLevel level, string message, object[] args)

Logs the specified message with an Exception at the specified level.

public static void Log(Exception ex, LogLevel level, string message)

Logs the specified message with an Exception at the specified level.

public static void Reset()

Set the config of the InternalLogger with defaults and config.

public static void Trace(string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the Trace level.

public static void Trace(Exception ex, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the Trace level.

public static void Trace(string message, object[] args)

Logs the specified message without an Exception at the Trace level.

public static void Trace(string message)

Logs the specified message without an Exception at the Trace level.

public static void Trace(Func<string> messageFunc)

Logs the specified message without an Exception at the Trace level. messageFunc will be only called when logging is enabled for level Trace.

public static void Trace(Exception ex, string message, object[] args)

Logs the specified message with an Exception at the Trace level.

public static void Trace<TArgument1>(string message, TArgument1 arg0)

Logs the specified message without an Exception at the Trace level.

public static void Trace<TArgument1, TArgument2>(string message, TArgument1 arg0, TArgument2 arg1)

Logs the specified message without an Exception at the Trace level.

public static void Trace<TArgument1, TArgument2, TArgument3>(string message, TArgument1 arg0, TArgument2 arg1, TArgument3 arg2)

Logs the specified message without an Exception at the Trace level.

public static void Trace(Exception ex, string message)

Logs the specified message with an Exception at the Trace level.

public static void Trace(Exception ex, Func<string> messageFunc)

Logs the specified message with an Exception at the Trace level. messageFunc will be only called when logging is enabled for level Trace.

public static void Warn(string message, ReadOnlySpan<object> args)

Logs the specified message without an Exception at the Warn level.

public static void Warn(Exception ex, string message, ReadOnlySpan<object> args)

Logs the specified message with an Exception at the Warn level.

public static void Warn(string message, object[] args)

Logs the specified message without an Exception at the Warn level.

public static void Warn(string message)

Logs the specified message without an Exception at the Warn level.

public static void Warn(Func<string> messageFunc)

Logs the specified message without an Exception at the Warn level. messageFunc will be only called when logging is enabled for level Warn.

public static void Warn(Exception ex, string message, object[] args)

Logs the specified message with an Exception at the Warn level.

public static void Warn<TArgument1>(string message, TArgument1 arg0)

Logs the specified message without an Exception at the Trace level.

public static void Warn<TArgument1, TArgument2>(string message, TArgument1 arg0, TArgument2 arg1)

Logs the specified message without an Exception at the Trace level.

public static void Warn<TArgument1, TArgument2, TArgument3>(string message, TArgument1 arg0, TArgument2 arg1, TArgument3 arg2)

Logs the specified message without an Exception at the Trace level.

public static void Warn(Exception ex, string message)

Logs the specified message with an Exception at the Warn level.

public static void Warn(Exception ex, Func<string> messageFunc)

Logs the specified message with an Exception at the Warn level. messageFunc will be only called when logging is enabled for level Warn.