package net.acomputerdog.core.logger;

/**
 * Logging levels such as DEBUG, INFO, ERROR, etc.
 */
public enum LogLevel {
    /**
     * LogLevel for full debug logging
     */
    DEBUG("DEBUG", 0, true, false),
    /**
     * LogLevel for smaller debug logging
     */
    DETAIL("DETAIL", 1, true, false),
    /**
     * LogLevel for normal message logging.
     */
    INFO("INFO", 2, false, false),
    /**
     * LogLevel for logging warnings, such as when an unexpected value is encountered.
     */
    WARNING("WARNING", 3, false, false),
    /**
     * LogLevel for logging errors, such as an exception
     */
    ERROR("ERROR", 4, false, true),
    /**
     * LogLevel for logging application-terminating errors, such as when a required library could not be loaded
     */
    FATAL("FATAL", 5, false, true),
    /**
     * LogLevel for logging stack traces.
     */
    STACK("STACK", 6, false, true);

    /**
     * The name of this LogLevel
     */
    private String levelName;

    /**
     * The numerical priority of this LogLevel
     */
    private int priority;

    /**
     * If this LogLevel is a debug level
     */
    private boolean isDebug;

    /**
     * If this LogLevel is an error level
     */
    private boolean isError;

    /**
     * Creates a new LogLevel
     *
     * @param levelName The name of this Level
     * @param priority  The priority of this level
     * @param isDebug   If this Level is a debug level
     * @param isError   If this level is an error level
     */
    private LogLevel(String levelName, int priority, boolean isDebug, boolean isError) {
        this.levelName = levelName;
        this.priority = priority;
        this.isDebug = isDebug;
        this.isError = isError;
    }

    /**
     * Gets a String representing the name of this logging level.
     *
     * @return Return a String representing the name of this logging level.
     */
    public String getLevelName() {
        return levelName;
    }

    /**
     * Gets an int representing the priority level of this logging level.
     *
     * @return Return an int representing the priority level of this logging level.
     */
    public int getPriority() {
        return priority;
    }

    /**
     * Returns true if this Logging level is a debug level (DEBUG or DETAIL).
     *
     * @return Return true if this Logging level is a debug level
     */
    public boolean isDebug() {
        return isDebug;
    }

    /**
     * Returns true if this logging level is an error level (ERROR or FATAL)
     *
     * @return Return true if this logging level is an error level
     */
    public boolean isError() {
        return isError;
    }

    /**
     * Returns true if this ELogLevel is allowed with the specified priority.
     *
     * @param priority The priority to compare to.
     * @return Returns true if this ELogLevel is allowed with the specified priority.
     */
    public boolean isAllowedBy(int priority) {
        return this.priority >= priority;
    }

    /**
     * Returns true if this ELogLevel is allowed with the specified priority.
     *
     * @param priority The priority to compare to.
     * @return Returns true if this ELogLevel is allowed with the specified priority.
     */
    public boolean isAllowedBy(LogLevel priority) {
        return this.priority >= priority.getPriority();
    }

    /**
     * Gets the ELogLevel identified by the given name.
     *
     * @param name The name of the ELogLevel to get.
     * @return Return the ELogLevel identified by the given name, or null if none exists.
     */
    public static LogLevel getByName(String name) {
        if (name == null) {
            throw new IllegalArgumentException("name cannot be null!");
        } else {
            for (LogLevel level : values()) {
                if (name.equals(level.getLevelName())) {
                    return level;
                }
            }
            return null;
        }
    }
}

@@ -192,24 +192,31 @@
 G%22, 0, true,
+ false,
  false),%0A   
@@ -204,32 +204,32 @@
  false, false),%0A
-
     /**%0A     * L
@@ -295,24 +295,31 @@
 L%22, 1, true,
+ false,
  false),%0A   
@@ -393,32 +393,39 @@
 INFO%22, 2, false,
+ false,
  false),%0A    /**
@@ -544,32 +544,39 @@
 NING%22, 3, false,
+ false,
  false),%0A    /**
@@ -666,32 +666,39 @@
 , 4, false, true
+, false
 ),%0A    /**%0A     
@@ -845,16 +845,23 @@
 se, true
+, false
 ),%0A    /
@@ -937,24 +937,30 @@
 %22, 6, false,
+ true,
  true);%0A%0A   
@@ -1301,16 +1301,128 @@
 Error;%0A%0A
+    /**%0A     * If this LogLevel is allowed to log regardless of LogLevel%0A     */%0A    private boolean isVoiced;%0A%0A
     /**%0A
@@ -1760,16 +1760,34 @@
  isError
+, boolean isVoiced
 ) %7B%0A    
@@ -1908,32 +1908,66 @@
 rror = isError;%0A
+        this.isVoiced = isVoiced;%0A
     %7D%0A%0A    /**%0A 
@@ -2884,32 +2884,250 @@
 isError;%0A    %7D%0A%0A
+    /**%0A     * Checks if this LogLevel can output irregardless of minimum log level%0A     *%0A     * @return Return true if this LogLevel is voiced.%0A     */%0A    public boolean isVoiced() %7B%0A        return isVoiced;%0A    %7D%0A%0A
     /**%0A     * R
@@ -3401,32 +3401,49 @@
 %7B%0A        return
+ this.isVoiced %7C%7C
  this.priority %3E
@@ -3743,32 +3743,32 @@
 vel priority) %7B%0A
-
         return t
@@ -3761,24 +3761,41 @@
       return
+ this.isVoiced %7C%7C
  this.priori

Add isVoiced to LogLevel