/** * Log a message with level {@link LogLevel#WARN}. * * @param msg the message to log */ public static void w(String msg) { assertInitialization(); sLogger.w(msg); }
/** * Convenience of {@link #build()} and {@link Logger#w(Object)}. * * @since 1.1.0 */ public void w(Object object) { build().w(object); }
/** * Convenience of {@link #build()} and {@link Logger#w(String, Throwable)}. */ public void w(String msg, Throwable tr) { build().w(msg, tr); }
/** * Convenience of {@link #build()} and {@link Logger#w(Object[])}. * * @since 1.4.0 */ public void w(Object[] array) { build().w(array); }
/** * Convenience of {@link #build()} and {@link Logger#w(String)}. */ public void w(String msg) { build().w(msg); }
/** * Log an object with level {@link LogLevel#WARN}. * * @param object the object to log * @see LogConfiguration.Builder#addObjectFormatter(Class, ObjectFormatter) * @since 1.1.0 */ public static void w(Object object) { assertInitialization(); sLogger.w(object); }
/** * Log a message with level {@link LogLevel#WARN}. * * @param format the format of the message to log * @param args the arguments of the message to log */ public static void w(String format, Object... args) { assertInitialization(); sLogger.w(format, args); }
/** * Log a message and a throwable with level {@link LogLevel#WARN}. * * @param msg the message to log * @param tr the throwable to be log */ public static void w(String msg, Throwable tr) { assertInitialization(); sLogger.w(msg, tr); }
/** * Convenience of {@link #build()} and {@link Logger#w(String, Object...)}. */ public void w(String format, Object... args) { build().w(format, args); }
/** * Log an array with level {@link LogLevel#WARN}. * * @param array the array to log */ public static void w(Object[] array) { assertInitialization(); sLogger.w(array); }
/** * @deprecated compatible with {@link android.util.Log#w(String, Throwable)} */ public static void w(String tag, Throwable tr) { tag(tag).build().w("", tr); }
/** * @deprecated compatible with {@link android.util.Log#w(String, String)} */ public static void w(String tag, String msg) { tag(tag).build().w(msg); }
/** * @deprecated compatible with {@link android.util.Log#w(String, String, Throwable)} */ public static void w(String tag, String msg, Throwable tr) { tag(tag).build().w(msg, tr); }
break; case LogLevel.WARN: logger.w(MESSAGE); break; case LogLevel.ERROR:
AssertUtil.assertNoLog(logsContainer); logsContainer.clear(); logger.w(MESSAGE); assertLog(WARN, DEFAULT_TAG, MESSAGE); logsContainer.clear(); logger.d(MESSAGE); logger.i(MESSAGE); logger.w(MESSAGE); logger.e(MESSAGE); logger.log(7, MESSAGE); assertLog(INFO, DEFAULT_TAG, MESSAGE); logsContainer.clear(); logger.w(MESSAGE); assertLog(WARN, DEFAULT_TAG, MESSAGE); logsContainer.clear();