diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java b/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java index 519962cf7ca..360d9f2ffc0 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java @@ -57,7 +57,8 @@ public class JavaUtilLog extends AbstractLogger public void warn(String msg, Object... args) { - _logger.log(Level.WARNING, format(msg, args)); + if (_logger.isLoggable(Level.WARNING)) + _logger.log(Level.WARNING,format(msg,args)); } public void warn(Throwable thrown) @@ -72,7 +73,8 @@ public class JavaUtilLog extends AbstractLogger public void info(String msg, Object... args) { - _logger.log(Level.INFO, format(msg, args)); + if (_logger.isLoggable(Level.INFO)) + _logger.log(Level.INFO, format(msg, args)); } public void info(Throwable thrown) @@ -105,7 +107,8 @@ public class JavaUtilLog extends AbstractLogger public void debug(String msg, Object... args) { - _logger.log(Level.FINE, format(msg, args)); + if (_logger.isLoggable(Level.FINE)) + _logger.log(Level.FINE,format(msg, args)); } public void debug(Throwable thrown)