@@ -0,0 +1,1608 @@
+package me.allenz.zlog;%0A%0Aimport android.util.Log;%0A%0A/**%0A * Enumeration of log level, providing additional log level 'OFF'.%0A * %0A * @author Allenz%0A * @since 0.1.0-RELEASE%0A * @see android.util.Log%0A */%0Apublic enum LogLevel %7B%0A%0A%09/** @see android.util.Log#VERBOSE */%0A%09VERBOSE(Log.VERBOSE),%0A%09/** @see android.util.Log#DEBUG */%0A%09DEBUG(Log.DEBUG),%0A%09/** @see android.util.Log#INFO */%0A%09INFO(Log.INFO),%0A%09/** @see android.util.Log#WARN */%0A%09WARN(Log.WARN),%0A%09/** @see android.util.Log#ERROR */%0A%09ERROR(Log.ERROR),%0A%09/** @see android.util.Log#ASSERT */%0A%09ASSERT(Log.ASSERT),%0A%09/** This log level means all messages will not be printed. */%0A%09OFF(Integer.MAX_VALUE);%0A%0A%09private final int intVal;%0A%0A%09LogLevel(final int intVal) %7B%0A%09%09this.intVal = intVal;%0A%09%7D%0A%0A%09/**%0A%09 * Get the integer value of LogLevel, the value is the same as origin%0A%09 * android log level, except the additonal log level 'OFF'.%0A%09 * %0A%09 * @return The integer value of log level.%0A%09 */%0A%09public int intValue() %7B%0A%09%09return intVal;%0A%09%7D%0A%0A%09/**%0A%09 * Figure out if this LogLevel instance includes the specified LogLevel. %3Cbr%3E%0A%09 * For Example:%3Cbr%3E%0A%09 * %3Ccode%3ELogLevel.DEBUG.includes(LogLevel.INFO)%3C/code%3E returns TRUE%3Cbr%3E%0A%09 * %3Ccode%3ELogLevel.DEBUG.includes(LogLevel.DEBUG)%3C/code%3E returns TRUE%3Cbr%3E%0A%09 * %3Ccode%3ELogLevel.DEBUG.includes(LogLevel.VERBOSE)%3C/code%3E returns FALSE%3Cbr%3E%0A%09 * %0A%09 * @param level%0A%09 *            The LogLevel instance to compare%0A%09 * @return If this LogLevel instance includes the specified LogLevel returns%0A%09 *         true, otherwise returns false.%0A%09 */%0A%09public boolean includes(final LogLevel level) %7B%0A%09%09return level != null && this.intValue() %3C= level.intValue();%0A%09%7D%0A%7D%0A

add enum LogLevel