protected override void LogCore(SimpleLogEntry entry) { StringBuilder sb = new StringBuilder(); sb.Append(entry.LogName); sb.Append(" : "); sb.Append(entry.Level); sb.Append(" : "); sb.Append(entry.Message); if (entry.Exception != null) { sb.AppendLine(); sb.Append(GetExceptionString(entry.Exception)); } //send to trace System.Diagnostics.Trace.WriteLine(sb.ToString()); //send to test output try { output.WriteLine(sb.ToString()); } catch (InvalidOperationException) { } }
protected abstract void LogCore(SimpleLogEntry entry);