public static void e(bool condition, CTag tag, object arg) { if (condition && ShouldLogLevel(CLogLevel.Error) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Error, arg != null ? arg.ToString() : ""); } }
public static void e <A0>(CTag tag, string format, A0 arg0) { if (ShouldLogLevel(CLogLevel.Error) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Error, CStringUtils.TryFormat(format, arg0)); } }
public static void w <A0, A1, A2>(bool condition, CTag tag, string format, A0 arg0, A1 arg1, A2 arg2) { if (condition && ShouldLogLevel(CLogLevel.Warn) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Warn, CStringUtils.TryFormat(format, arg0, arg1, arg2)); } }
public static void w(bool condition, CTag tag, string format, params object[] args) { if (condition && ShouldLogLevel(CLogLevel.Warn) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Warn, CStringUtils.TryFormat(format, args)); } }
public static void w <A0, A1>(CTag tag, string format, A0 arg0, A1 arg1) { if (ShouldLogLevel(CLogLevel.Warn) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Warn, CStringUtils.TryFormat(format, arg0, arg1)); } }
public static void w <A0, A1, A2, A3, A4>(CTag tag, string format, A0 arg0, A1 arg1, A2 arg2, A3 arg3, A4 arg4) { if (ShouldLogLevel(CLogLevel.Warn) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Warn, CStringUtils.TryFormat(format, arg0, arg1, arg2, arg3, arg4)); } }
public static void i <A0, A1>(bool condition, CTag tag, string format, A0 arg0, A1 arg1) { if (condition && ShouldLogLevel(CLogLevel.Info) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Info, CStringUtils.TryFormat(format, arg0, arg1)); } }
public static void w(CTag tag, object arg) { if (ShouldLogLevel(CLogLevel.Warn) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Warn, arg != null ? arg.ToString() : ""); } }
public static void i <A0, A1, A2, A3>(CTag tag, string format, A0 arg0, A1 arg1, A2 arg2, A3 arg3) { if (ShouldLogLevel(CLogLevel.Info) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Info, CStringUtils.TryFormat(format, arg0, arg1, arg2, arg3)); } }
public static void i(CTag tag, string format, params object[] args) { if (ShouldLogLevel(CLogLevel.Info) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Info, CStringUtils.TryFormat(format, args)); } }
public static void d <A0>(bool condition, CTag tag, string format, A0 arg0) { if (condition && ShouldLogLevel(CLogLevel.Debug) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Debug, CStringUtils.TryFormat(format, arg0)); } }
public static void d <A0, A1, A2>(CTag tag, string format, A0 arg0, A1 arg1, A2 arg2) { if (ShouldLogLevel(CLogLevel.Debug) && ShouldLogTag(tag)) { LogMessage(tag, CLogLevel.Debug, CStringUtils.TryFormat(format, arg0, arg1, arg2)); } }
internal static void LogMessage(CTag tag, CLogLevel level, string message, string stackTrace) { for (int i = 0; i < logDelegates.Count; ++i) { logDelegates[i](level, tag, message, stackTrace); } }
private static bool ShouldLogTag(CTag tag) { return(tag == null || tag.Enabled); }
internal static void LogMessage(CTag tag, CLogLevel level, string message) { LogMessage(tag, level, message, CStackTrace.ExtractStackTrace(3)); }