diff --git a/gradle.properties b/gradle.properties index 1b0292d..4dc4de0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Messiva -PROJECT_VERSION = 0.1.0.0 +PROJECT_VERSION = 0.1.0.1 ## dependencies diff --git a/src/main/java/cc/sukazyo/messiva/Logger.java b/src/main/java/cc/sukazyo/messiva/Logger.java index 9230cd9..ab406b5 100644 --- a/src/main/java/cc/sukazyo/messiva/Logger.java +++ b/src/main/java/cc/sukazyo/messiva/Logger.java @@ -1,6 +1,7 @@ package cc.sukazyo.messiva; import cc.sukazyo.messiva.appender.IAppender; +import cc.sukazyo.messiva.log.ILogLevelImpl; import cc.sukazyo.messiva.log.Log; import cc.sukazyo.messiva.log.LogLevel; import cc.sukazyo.messiva.log.Message; @@ -9,7 +10,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -public class Logger { +public class Logger implements ILogLevelImpl { public final List appends = new ArrayList<>(); @@ -23,6 +24,10 @@ public class Logger { pushToAllAppender(new Log(1, new Message(message), LogLevel.TRACE)); } + public void debug (String message) { + pushToAllAppender(new Log(1, new Message(message), LogLevel.DEBUG)); + } + public void info (String message) { pushToAllAppender(new Log(1, new Message(message), LogLevel.INFO)); } diff --git a/src/main/java/cc/sukazyo/messiva/log/ILogLevelImpl.java b/src/main/java/cc/sukazyo/messiva/log/ILogLevelImpl.java new file mode 100644 index 0000000..7921b26 --- /dev/null +++ b/src/main/java/cc/sukazyo/messiva/log/ILogLevelImpl.java @@ -0,0 +1,17 @@ +package cc.sukazyo.messiva.log; + +public interface ILogLevelImpl { + + void trace (String message); + + void debug (String message); + + void info (String message); + + void warn (String message); + + void error (String message); + + void fatal (String message); + +} diff --git a/src/main/java/cc/sukazyo/messiva/log/LogLevel.java b/src/main/java/cc/sukazyo/messiva/log/LogLevel.java index 0fe063c..bbdf42a 100644 --- a/src/main/java/cc/sukazyo/messiva/log/LogLevel.java +++ b/src/main/java/cc/sukazyo/messiva/log/LogLevel.java @@ -3,6 +3,7 @@ package cc.sukazyo.messiva.log; public enum LogLevel { TRACE(-1f, "TRAC"), + DEBUG(-0.1f, "DBUG"), INFO(0f, "INFO"), WARN(0.5f, "WARN"), ERROR(1f, "ERRO"),