Ejemplo n.º 1
0
        public void WhenEventsAreNotConsumed_FactoryIsNotInvoked()
        {
            bool factoryInvoked = false;
            Func <StructuredLogEntry> factory = () =>
            {
                factoryInvoked = true;
                return(new StructuredLogEntry("test"));
            };

            var logEntryEvent = new StructuredLogEntryEvent(factory);

            Assert.False(factoryInvoked);
        }
Ejemplo n.º 2
0
        private void OnLogEntry(StructuredLogEntryEvent logEvent)
        {
            string message = logEvent.LogEntry.ToJsonLineString();

            _traceWriter.Trace(message, TraceLevel.Verbose, null);
        }
Ejemplo n.º 3
0
        private void OnLogEntry(StructuredLogEntryEvent logEvent)
        {
            string message = logEvent.LogEntry.ToJsonLineString();

            _writer.AppendLine(message);
        }