Class TextFormatterData
- 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
stringTemplate 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
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
Properties
Template
Gets or sets the template containing tokens to replace.
public string Template { get; set; }
Property Value
Methods
BuildFormatter()
Builds the ILogFormatter object represented by this configuration object.
public override ILogFormatter BuildFormatter()
Returns
- ILogFormatter
A formatter.