Class LogEventFormatter
The log event formatter
Implements
Inherited Members
Namespace: Microsoft.Graph.Communications.Common.Telemetry
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public class LogEventFormatter : ILogEventFormatter
Constructors
LogEventFormatter(LogEventFormatterFlags, String, String)
Initializes a new instance of the LogEventFormatter class.
Declaration
public LogEventFormatter(LogEventFormatterFlags flags = LogEventFormatterFlags.ForDefault, string inlineSeparator = " ", string timestampFormat = "yyyy-MM-ddTHH:mm:ss.ffffZ")
Parameters
Type | Name | Description |
---|---|---|
LogEventFormatterFlags | flags | The formatter flags to control which will be shown in output message. |
String | inlineSeparator | The inline separator for logging fields |
String | timestampFormat | The default timestamp format |
Fields
DefaultTimestampFormat
The default timestamp format.
Declaration
public const string DefaultTimestampFormat = "yyyy-MM-ddTHH:mm:ss.ffffZ"
Field Value
Type | Description |
---|---|
String |
Methods
Format(LogEvent)
Format the log event.
Declaration
public string Format(LogEvent logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | logEvent | The log event |
Returns
Type | Description |
---|---|
String | The formatted text. |