Esempio n. 1
0
        private IBasicProperties GetBasicProperties(AsyncLogEventInfo loggingEvent)
        {
            var @event = loggingEvent.LogEvent;

            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)
            });
        }