package electrosphere.logger;

/**
 *
 * @author amaterasu
 */
public class Logger {
    
    public enum LogLevel {
        DEBUG,
        INFO,
        WARNING,
        ERROR,
    }
    
    LogLevel level;
    
    public Logger(LogLevel level){
        this.level = level;
    }
    
    public void DEBUG(String message){
        if(level == LogLevel.DEBUG){
            System.out.println(message);
        }
    }
    
    public void INFO(String message){
        if(level == LogLevel.DEBUG || level == LogLevel.INFO){
            System.out.println(message);
        }
    }
    
    public void WARNING(String message){
        if(level == LogLevel.DEBUG || level == LogLevel.INFO || level == LogLevel.WARNING){
            System.out.println(message);
        }
    }
    
    public void ERROR(String message, Exception e){
        if(level == LogLevel.DEBUG || level == LogLevel.INFO || level == LogLevel.WARNING || level == LogLevel.ERROR){
            System.out.println(message);
        }
    }
}
