PostSharp6.2/API Reference/Post­Sharp.​Patterns.​Diagnostics Namespace/Logger Class/Logger Methods/Logger.​Write­Exception Method/Logger.​Write­Exception Method (Log­Level, Exception, String, Object[])

Logger.WriteException Method (LogLevel, Exception, String, Object[])

Writes a custom record with an array of parameters and associates it with an Exception.

Namespace:  PostSharp.Patterns.Diagnostics
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.2.13.0 (6.2.13.0)
Syntax
C#
public void WriteException(
	LogLevel level,
	Exception exception,
	string text,
	Object[] args
)

Parameters

level
Type: PostSharp.Patterns.Diagnostics.LogLevel
The severity of the record (e.g. Warning or Error).
exception
Type: System.Exception
The Exception associated with the record.
text
Type: System.String
The text of the log record, including parameters (e.g. Opening {Path} file {ShareMode} sharing mode.)
args
Type: System.Object[]
An array of parameters.
See Also