<PackageReference Include="Serilog" Version="4.3.2-dev-02430" />

Serilog.Events.MessageTemplate

public class MessageTemplate
Represents a message template passed to a log method. The template can subsequently render the template in textual form given the list of properties.
public static MessageTemplate Empty { get; }

Represents the empty message template.

public string Text { get; }

The raw text describing the template.

The tokens parsed from the template.

Construct a message template using manually-defined text and property tokens.

public MessageTemplate(string text, IEnumerable<MessageTemplateToken> tokens)

Construct a message template using manually-defined text and property tokens.

public string Render(IReadOnlyDictionary<string, LogEventPropertyValue> properties, IFormatProvider formatProvider = null)

Convert the message template into a textual message, given the properties matching the tokens in the message template.

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

Convert the message template into a textual message, given the properties matching the tokens in the message template.