Beispiel #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);
        }
Beispiel #2
0
 public static void Warning(LogSource source, String message)
 {
     RawLog(LogEventKind.Warning, source, null, message, null);
 }
Beispiel #3
0
 public static void Information(LogSource source, Exception exception, String message, params Object[] items)
 {
     RawLog(LogEventKind.Information, source, exception, message, items);
 }
Beispiel #4
0
 public static void Information(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Information, source, exception, message, null);
 }
Beispiel #5
0
 public static void Information(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Information, source, exception, null, null);
 }
Beispiel #6
0
 public static void Debug(LogSource source, String message, params Object[] items)
 {
     RawLog(LogEventKind.Debug, source, null, message, items);
 }
Beispiel #7
0
 public static void Debug(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Debug, source, exception, null, null);
 }
Beispiel #8
0
 public static void Error(LogSource source, String message)
 {
     RawLog(LogEventKind.Error, source, null, message, null);
 }
Beispiel #9
0
 public static void Critical(LogSource source, Exception exception, String message, params Object[] items)
 {
     RawLog(LogEventKind.Critical, source, exception, message, items);
 }
Beispiel #10
0
 public static void Critical(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Critical, source, exception, message, null);
 }
Beispiel #11
0
 public static void Critical(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Critical, source, exception, null, null);
 }
Beispiel #12
0
 public static void Error(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Error, source, exception, message, null);
 }
Beispiel #13
0
 public static void Error(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Error, source, exception, null, null);
 }
Beispiel #14
0
 public static void Warning(LogSource source, Exception exception)
 {
     RawLog(LogEventKind.Warning, source, exception, null, null);
 }
Beispiel #15
0
 public static void Debug(LogSource source, String message)
 {
     RawLog(LogEventKind.Debug, source, null, message, null);
 }
Beispiel #16
0
 public static void Warning(LogSource source, Exception exception, String message)
 {
     RawLog(LogEventKind.Warning, source, exception, message, null);
 }
Beispiel #17
0
 public LogSource(LogSource ls)
 {
     this.Copy(ls);
 }