Esempio n. 1
0
        internal static string FormatRawPayload(LogEvent logEvent)
        {
            var payload = new StringWriter();

            payload.Write("{\"Events\":[");
            RawJsonFormatter.FormatContent(logEvent, payload);
            payload.Write("]}");
            return(payload.ToString());
        }
Esempio n. 2
0
        private static void BuildLogEvent(IEnumerable <LogEvent> logEvents, TextWriter payload)
        {
            payload.Write("[");
            var eventSeparator = "";

            foreach (var evnt in logEvents)
            {
                payload.Write(eventSeparator);
                eventSeparator = ",";
                RawJsonFormatter.FormatContent(evnt, payload);
            }
            payload.Write("]");
        }