示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
 private void WriteTraceEntry(ref TraceEntry traceEntry)
 {
     _writer.Write(ref traceEntry);
 }