public void Trace(TraceLevel traceLevel, object details, string message) { Contract.Requires <ArgumentNullException>(message != null); if (IsTraceEnabled(traceLevel)) { TraceEntry traceEntry = new TraceEntry(Name, traceLevel, message, details); WriteTraceEntry(ref traceEntry); } }
public void Trace(TraceLevel traceLevel, Exception exception, string message, object arg0, object arg1, object arg2) { Contract.Requires <ArgumentNullException>(message != null); if (IsTraceEnabled(traceLevel)) { message = string.Format(message, arg0, arg1, arg2); TraceEntry traceEntry = new TraceEntry(Name, traceLevel, message, exception); WriteTraceEntry(ref traceEntry); } }
private void WriteTraceEntry(ref TraceEntry traceEntry) { _writer.Write(ref traceEntry); }