Exemplo n.º 1
0
        public void WarnFmt2(string from, string to, string format, params object[] args)
        {
            Interlocked.Increment(ref _observerItem.WarnCount);
            int sniffMask;

            if (CanLog(TracingLevel.Warn, from, to, out sniffMask))
            {
                string message = TracingHelper.FormatMessage(format, args);
                WriteLog(sniffMask, TracingLevel.Warn, null, from, to, message);
                _counters.WarnPerSec.Increment();
                _counters.WarnTotal.Increment();
            }
        }
Exemplo n.º 2
0
        public void ErrorFmt2(Exception exception, string from, string to, string format, params object[] args)
        {
            Interlocked.Increment(ref _observerItem.ErrorCount);
            int sniffMask;

            if (CanLog(TracingLevel.Error, out sniffMask))
            {
                string message = TracingHelper.FormatMessage(format, args);
                WriteLog(sniffMask, TracingLevel.Error, exception, from, to, message);
                _counters.ErrorPerSec.Increment();
                _counters.ErrorTotal.Increment();
            }
        }
Exemplo n.º 3
0
        public void InfoFmt(Exception exception, string format, params object[] args)
        {
            Interlocked.Increment(ref _observerItem.InfoCount);
            int sniffMask;

            if (CanLog(TracingLevel.Info, out sniffMask))
            {
                string message = TracingHelper.FormatMessage(format, args);
                WriteLog(sniffMask, TracingLevel.Info, exception, string.Empty, string.Empty, message);
                _counters.InfoPerSec.Increment();
                _counters.InfoTotal.Increment();
            }
        }