Click or drag to resize

InternalLoggerLog Method (Exception, LogLevel, FuncString)

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

Namespace:  NLog.Common
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public static void Log(
	Exception? ex,
	LogLevel level,
	Func<string> messageFunc
)

Parameters

ex
Type: SystemException
Exception to be logged.
level
Type: NLogLogLevel
Log level.
messageFunc
Type: SystemFuncString
Function that returns the log message.
See Also