C# Class Serilog.Formatting.Display.MessageTemplateTextFormatter

A ITextFormatter that supports the Serilog message template format. Formatting log events for display has a different set of requirements and expectations from rendering the data within them. To meet this, the formatter overrides some behavior: First, strings are always output as literals (not quoted) unless some other format is applied to them. Second, tokens without matching properties are skipped rather than being written as raw text.
Inheritance: ITextFormatter
Exibir arquivo Open project: serilog/serilog Class Usage Examples

Public Methods

Method Description
Format ( LogEvent logEvent, TextWriter output ) : void

Format the log event into the output.

MessageTemplateTextFormatter ( string outputTemplate, IFormatProvider formatProvider ) : System

Construct a MessageTemplateTextFormatter.

Method Details

Format() public method

Format the log event into the output.
public Format ( LogEvent logEvent, TextWriter output ) : void
logEvent Serilog.Events.LogEvent The event to format.
output System.IO.TextWriter The output.
return void

MessageTemplateTextFormatter() public method

Construct a MessageTemplateTextFormatter.
public MessageTemplateTextFormatter ( string outputTemplate, IFormatProvider formatProvider ) : System
outputTemplate string A message template describing the /// output messages.
formatProvider IFormatProvider Supplies culture-specific formatting information, or null.
return System