Table of Contents

Class MessageTemplateToken

Namespace
Serilog.Parsing
Assembly
Serilog.dll

An element parsed from a message template string.

public abstract class MessageTemplateToken
Inheritance
MessageTemplateToken
Derived
Inherited Members

Constructors

MessageTemplateToken()

protected MessageTemplateToken()

Properties

Length

The token's length.

public abstract int Length { get; }

Property Value

int

Methods

Render(IReadOnlyDictionary<string, LogEventPropertyValue>, TextWriter, IFormatProvider?)

Render the token to the output.

public abstract void Render(IReadOnlyDictionary<string, LogEventPropertyValue> properties, TextWriter output, IFormatProvider? formatProvider = null)

Parameters

properties IReadOnlyDictionary<string, LogEventPropertyValue>

Properties that may be represented by the token.

output TextWriter

Output for the rendered string.

formatProvider IFormatProvider

Supplies culture-specific formatting information, or null.