PostSharp 6.5 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / ILogger Interface / ILogger Methods / ILogger.​Write Method / ILogger.​Write(T1) Method (ILogging­Context, Log­Level, Log­Record­Kind, String, T1, Exception, Caller­Info)

ILogger.Write<T1> Method (ILoggingContext, LogLevel, LogRecordKind, String, T1, Exception, CallerInfo)

Writes a custom log record with 1 parameter.

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>(
	ILoggingContext context,
	LogLevel level,
	LogRecordKind recordKind,
	string text,
	T1 arg1,
	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.
exception
Type: System.Exception
The Exception associated with the record, or null.
recordInfo
Type: PostSharp.Patterns.Diagnostics.Contexts.CallerInfo
Information about the caller souICustomActivityLoggingContextrce code.

Type Parameters

T1
Type of the 1-th parameter.
See Also