public GelfMessageBuilder(string message, string host, DateTime timestamp, GelfLevel level) { this.message = message; this.host = host; this.timestamp = timestamp; this.level = level; }
public GelfMessageBuilder(string message, string host, DateTime timestamp, GelfLevel level) { _message = message; _host = host; _timestamp = timestamp; _level = level; }
public GelfMessageBuilder SetLevel(GelfLevel value) { level = value; return(this); }
protected GelfMessageBuilder CreateGelfMessageBuilder(string message, DateTime timeStamp, GelfLevel logLevel) { var messageBuilder = new GelfMessageBuilder(message, Environment.MachineName.ToUpperInvariant(), timeStamp, logLevel); if (_config.AdditionalProperties == null) { return(messageBuilder); } foreach (var kvp in _config.AdditionalProperties) { messageBuilder.SetAdditionalField($"{_config.PropertyPrefix}{kvp.Key}", kvp.Value); } return(messageBuilder); }