private GelfMessage GetBaseGelfMessage(LoggingEvent loggingEvent)
{
var message = new GelfMessage
{
Facility = Facility ?? "GELF",
File = string.Empty,
Host = HostName ?? Environment.MachineName,
Level = GetSyslogSeverity(loggingEvent.Level),
Line = string.Empty,
TimeStamp = loggingEvent.TimeStamp,
Version = GELF_VERSION,
};
message.Add("LoggerName", loggingEvent.LoggerName);
if (this.IncludeLocationInformation)
{
message.File = loggingEvent.LocationInformation.FileName;
message.Line = loggingEvent.LocationInformation.LineNumber;
}
return message;
}