public void DoAppend(LoggingEvent loggingEvent)
        {
            StringWriter writer = new StringWriter();

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