diff --git a/core/src/com/riiablo/logger/AbstractLogger.java b/core/src/com/riiablo/logger/AbstractLogger.java index 92b7961c..1d70602c 100644 --- a/core/src/com/riiablo/logger/AbstractLogger.java +++ b/core/src/com/riiablo/logger/AbstractLogger.java @@ -45,6 +45,10 @@ abstract class AbstractLogger { return enabled(Level.DEBUG); } + public final boolean warnEnabled() { + return enabled(Level.WARN); + } + public final void trace(final String message, final Object... params) { logIfEnabled(Level.TRACE, defaultFactory().newMessage(message, params), getLocation()); } @@ -53,6 +57,10 @@ abstract class AbstractLogger { logIfEnabled(Level.DEBUG, defaultFactory().newMessage(message, params), getLocation()); } + public final void warn(final String message, final Object... params) { + logIfEnabled(Level.WARN, defaultFactory().newMessage(message, params), getLocation()); + } + public final void tracef(final String message, final Object... params) { logIfEnabled(Level.TRACE, formattedFactory().newMessage(message, params), getLocation()); } @@ -61,6 +69,10 @@ abstract class AbstractLogger { logIfEnabled(Level.DEBUG, formattedFactory().newMessage(message, params), getLocation()); } + public final void warnf(final String message, final Object... params) { + logIfEnabled(Level.WARN, formattedFactory().newMessage(message, params), getLocation()); + } + private StackTraceElement getLocation() { return getLocation(FQCN); }