public void DoAppend(LoggingEvent loggingEvent) { StringWriter writer = new StringWriter(); if (Layout == null) { loggingEvent.WriteRenderedMessage(writer); } else { Layout.Format(writer, loggingEvent); } RecordedMessages.Add(writer.ToString()); }
public void Log <TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func <TState, Exception, string> formatter) { RecordedMessages = RecordedMessages.Add(state.ToString()); }