Table of Contents

Class TextFormatterData

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.Configuration
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

Represents the configuration settings for a TextFormatter.

public class TextFormatterData : FormatterData
Inheritance
TextFormatterData

Constructors

TextFormatterData()

Initializes a new instance of the TextFormatterData class with default values.

public TextFormatterData()

TextFormatterData(string)

Initialize a new instance of the TextFormatterData class with a template.

public TextFormatterData(string templateData)

Parameters

templateData string

Template containing tokens to replace.

TextFormatterData(string, string)

Initialize a new instance of the TextFormatterData class with a name and template.

public TextFormatterData(string name, string templateData)

Parameters

name string

The name of the formatter.

templateData string

Template containing tokens to replace.

Fields

DefaultTemplate

public const string DefaultTemplate = "Timestamp: {timestamp}{newline}\nMessage: {message}{newline}\nCategory: {category}{newline}\nPriority: {priority}{newline}\nEventId: {eventid}{newline}\nSeverity: {severity}{newline}\nTitle:{title}{newline}\nMachine: {localMachine}{newline}\nApp Domain: {localAppDomain}{newline}\nProcessId: {localProcessId}{newline}\nProcess Name: {localProcessName}{newline}\nThread Name: {threadName}{newline}\nWin32 ThreadId:{win32ThreadId}{newline}\nExtended Properties: {dictionary({key} - {value}{newline})}"

Field Value

string

Properties

Template

Gets or sets the template containing tokens to replace.

public string Template { get; set; }

Property Value

string

Methods

BuildFormatter()

Builds the ILogFormatter object represented by this configuration object.

public override ILogFormatter BuildFormatter()

Returns

ILogFormatter

A formatter.