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); }
public static void Warning(LogSource source, String message) { RawLog(LogEventKind.Warning, source, null, message, null); }
public static void Information(LogSource source, Exception exception, String message, params Object[] items) { RawLog(LogEventKind.Information, source, exception, message, items); }
public static void Information(LogSource source, Exception exception, String message) { RawLog(LogEventKind.Information, source, exception, message, null); }
public static void Information(LogSource source, Exception exception) { RawLog(LogEventKind.Information, source, exception, null, null); }
public static void Debug(LogSource source, String message, params Object[] items) { RawLog(LogEventKind.Debug, source, null, message, items); }
public static void Debug(LogSource source, Exception exception) { RawLog(LogEventKind.Debug, source, exception, null, null); }
public static void Error(LogSource source, String message) { RawLog(LogEventKind.Error, source, null, message, null); }
public static void Critical(LogSource source, Exception exception, String message, params Object[] items) { RawLog(LogEventKind.Critical, source, exception, message, items); }
public static void Critical(LogSource source, Exception exception, String message) { RawLog(LogEventKind.Critical, source, exception, message, null); }
public static void Critical(LogSource source, Exception exception) { RawLog(LogEventKind.Critical, source, exception, null, null); }
public static void Error(LogSource source, Exception exception, String message) { RawLog(LogEventKind.Error, source, exception, message, null); }
public static void Error(LogSource source, Exception exception) { RawLog(LogEventKind.Error, source, exception, null, null); }
public static void Warning(LogSource source, Exception exception) { RawLog(LogEventKind.Warning, source, exception, null, null); }
public static void Debug(LogSource source, String message) { RawLog(LogEventKind.Debug, source, null, message, null); }
public static void Warning(LogSource source, Exception exception, String message) { RawLog(LogEventKind.Warning, source, exception, message, null); }
public LogSource(LogSource ls) { this.Copy(ls); }