Пример #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);
 }