示例#1
0
        private static void RawLog(LogEventKind kind, LogSource source, Exception exception, String message, Object[] items)
        {
            if (Handler is null)
            {
                return;
            }

            var li = new LogInformation
            {
                Kind      = kind,
                Source    = source,
                Timestamp = new TimeSpan(DateTime.UtcNow.Ticks),
                Message   = message,
                Exception = exception,
                Items     = items,
            };

            Handler.Enqueue(li);
        }
示例#2
0
 public static void Warning(LogSource source, String message)
 {
     RawLog(LogEventKind.Warning, source, null, message, null);
 }
示例#3
0
 public static void Information(LogSource source, Exception exception, String message, params Object[] items)
 {
     RawLog(LogEventKind.Information, source, exception, message, items);
 }
示例#4
0
 public static void Information(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Information, source, exception, message, null);
 }
示例#5
0
 public static void Information(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Information, source, exception, null, null);
 }
示例#6
0
 public static void Debug(LogSource source, String message, params Object[] items)
 {
     RawLog(LogEventKind.Debug, source, null, message, items);
 }
示例#7
0
 public static void Debug(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Debug, source, exception, null, null);
 }
示例#8
0
 public static void Error(LogSource source, String message)
 {
     RawLog(LogEventKind.Error, source, null, message, null);
 }
示例#9
0
 public static void Critical(LogSource source, Exception exception, String message, params Object[] items)
 {
     RawLog(LogEventKind.Critical, source, exception, message, items);
 }
示例#10
0
 public static void Critical(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Critical, source, exception, message, null);
 }
示例#11
0
 public static void Critical(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Critical, source, exception, null, null);
 }
示例#12
0
 public static void Error(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Error, source, exception, message, null);
 }
示例#13
0
 public static void Error(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Error, source, exception, null, null);
 }
示例#14
0
 public static void Warning(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Warning, source, exception, null, null);
 }
示例#15
0
 public static void Debug(LogSource source, String message)
 {
     RawLog(LogEventKind.Debug, source, null, message, null);
 }
示例#16
0
 public static void Warning(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Warning, source, exception, message, null);
 }
示例#17
0
 public LogSource(LogSource ls)
 {
     this.Copy(ls);
 }