public void WhenEventsAreNotConsumed_FactoryIsNotInvoked() { bool factoryInvoked = false; Func <StructuredLogEntry> factory = () => { factoryInvoked = true; return(new StructuredLogEntry("test")); }; var logEntryEvent = new StructuredLogEntryEvent(factory); Assert.False(factoryInvoked); }
private void OnLogEntry(StructuredLogEntryEvent logEvent) { string message = logEvent.LogEntry.ToJsonLineString(); _traceWriter.Trace(message, TraceLevel.Verbose, null); }
private void OnLogEntry(StructuredLogEntryEvent logEvent) { string message = logEvent.LogEntry.ToJsonLineString(); _writer.AppendLine(message); }