PostSharp 6.5 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / ILogger Interface / ILogger Methods / ILogger.​Write Method / ILogger.​Write(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) Method (ILogging­Context, Log­Level, Log­Record­Kind, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Exception, Caller­Info)

ILogger.Write<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Method (ILoggingContext, LogLevel, LogRecordKind, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Exception, CallerInfo)

Writes a custom log record with 10 parameters.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.5.19.0 (6.5.19.0)
Syntax
C#
void Write<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
	ILoggingContext context,
	LogLevel level,
	LogRecordKind recordKind,
	string text,
	T1 arg1,
	T2 arg2,
	T3 arg3,
	T4 arg4,
	T5 arg5,
	T6 arg6,
	T7 arg7,
	T8 arg8,
	T9 arg9,
	T10 arg10,
	Exception exception,
	ref CallerInfo recordInfo
)

Parameters

context
Type: PostSharp.Patterns.Diagnostics.Contexts.ILoggingContext
The context for which the message has to be written.
level
Type: PostSharp.Patterns.Diagnostics.LogLevel
The severity of the record (e.g. Info or Warning).
recordKind
Type: PostSharp.Patterns.Diagnostics.LogRecordKind
Kind of record.
text
Type: System.String
The text of the log record, including parameters (e.g. Opening {Path} file {ShareMode} sharing mode).
arg1
Type: T1
Value of the 1-th parameter.
arg2
Type: T2
Value of the 2-th parameter.
arg3
Type: T3
Value of the 3-th parameter.
arg4
Type: T4
Value of the 4-th parameter.
arg5
Type: T5
Value of the 5-th parameter.
arg6
Type: T6
Value of the 6-th parameter.
arg7
Type: T7
Value of the 7-th parameter.
arg8
Type: T8
Value of the 8-th parameter.
arg9
Type: T9
Value of the 9-th parameter.
arg10
Type: T10
Value of the 10-th parameter.
exception
Type: System.Exception
The Exception associated with the record, or null.
recordInfo
Type: PostSharp.Patterns.Diagnostics.Contexts.CallerInfo
Information about the caller source code.

Type Parameters

T1
Type of the 1-th parameter.
T2
Type of the 2-th parameter.
T3
Type of the 3-th parameter.
T4
Type of the 4-th parameter.
T5
Type of the 5-th parameter.
T6
Type of the 6-th parameter.
T7
Type of the 7-th parameter.
T8
Type of the 8-th parameter.
T9
Type of the 9-th parameter.
T10
Type of the 10-th parameter.
See Also