[This is preliminary documentation and is subject to change.]

Writes the diagnostic message and exception at the specified level.

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 2.0.0.0

Syntax

C#
public void LogException(
	LogLevel level,
	string message,
	Exception exception
)
Visual Basic (Declaration)
Public Sub LogException ( _
	level As LogLevel, _
	message As String, _
	exception As Exception _
)
Visual C++
public:
void LogException(
	LogLevel^ level, 
	String^ message, 
	Exception^ exception
)

Parameters

level
Type: NLog..::.LogLevel
The log level.
message
Type: System..::.String
A string to be written.
exception
Type: System..::.Exception
An exception to be logged.

See Also