Esempio n. 1
0
 public override void Format(System.IO.TextWriter writer, log4net.Core.LoggingEvent loggingEvent)
 {
     writer.Write("<log>");
     writer.Write("<datetime>" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</datetime>");
     writer.Write("<level>" + loggingEvent.Level.DisplayName + "</level>");
     writer.Write("<message>");
     loggingEvent.WriteRenderedMessage(writer);
     writer.Write("</message>");
     writer.Write("</log>");
     writer.WriteLine();
 }
Esempio n. 2
0
 public override void Format(System.IO.TextWriter writer, log4net.Core.LoggingEvent loggingEvent)
 {
     writer.Write("<log>");
     writer.Write("<datetime>" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</datetime>");
     writer.Write("<testcase>" + log4net.ThreadContext.Properties["TestCaseName"] + "</testcase>");
     writer.Write("<step>" + log4net.ThreadContext.Properties["StepName"] + "</step>");
     writer.Write("<level>" + loggingEvent.Level.DisplayName + "</level>");
     writer.Write("<message>");
     loggingEvent.WriteRenderedMessage(writer);
     writer.Write("</message>");
     writer.Write("</log>");
     writer.WriteLine();
 }