Example #1
0
 private IBasicProperties GetBasicProperties(LogEventInfo @event)
 {
     return(new BasicProperties
     {
         ContentEncoding = "utf8",
         ContentType = _UseJSON ? "application/json" : "text/plain",
         AppId = AppId ?? @event.LoggerName,
         Timestamp = new AmqpTimestamp(MessageFormatter.GetEpochTimeStamp(@event)),
         UserId = UserName,                 // support Validated User-ID (see http://www.rabbitmq.com/extensions.html)
         DeliveryMode = (byte)DeliveryMode
     });
 }
Example #2
0
        private byte[] GetMessage(LogEventInfo info)
        {
            var msg = MessageFormatter.GetMessageInner(UseJSON, this.UseLayoutAsMessage, Layout, info, this.Fields);

            return(_Encoding.GetBytes(msg));
        }
Example #3
0
        private byte[] GetMessage(LogEventInfo info)
        {
            string messageInner = MessageFormatter.GetMessageInner(this.UseJSON, this.UseLayoutAsMessage, this.Layout, info, this.Fields);

            return(this._Encoding.GetBytes(messageInner));
        }