Пример #1
0
        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) { }
        }
Пример #2
0
 protected abstract void LogCore(SimpleLogEntry entry);