-
Notifications
You must be signed in to change notification settings - Fork 0
808ffa42 0738 9cb6 b0ab 05a9196526c8
This method formats provided logging event and writes the result back into provided string builder.
Namespace: Plexdata.LogWriter.Internals.Formatters
Assembly: Plexdata.LogWriter.Abstraction (in Plexdata.LogWriter.Abstraction.dll) Version: 1.0.7.1
C#
public void Format(
StringBuilder builder,
ILogEvent value
)
- builder
- Type: System.Text.StringBuilder
The string builder instance that takes the formatted logging event. - value
- Type: Plexdata.LogWriter.Abstraction.ILogEvent
The logging event instance to be formatted.
ILogEventFormatter.Format(StringBuilder, ILogEvent)
Exception | Condition |
---|---|
ArgumentNullException | This exception is thrown as soon as one the parameters is null . |
The GELF formatter turns parameter value into a valid GELF message consisting at least of fields version
, host
, short_message
and level
. Each logging level is converted into its corresponding Syslog Severity Level automatically.
Optional field timestamp
can be used by enabling property ShowTime. Indeed, the usage of timestamp
at client side is recommended.
Optional field full_message
is used as message text only if short_message
contains a template. However, a usage of templates is not yet supported. This in turn means that full_message
remains empty for the moment.
GelfFormatter Class
Plexdata.LogWriter.Internals.Formatters Namespace
ILoggerSettings.ShowKey
ILoggerSettings.ShowTime
DateTimeExtension.ToUnixEpoch(DateTime)
LogLevelExtension.ToUnixSeverityLevel(LogLevel)