diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/ServerFeatureSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/ServerFeatureSupport.java index 36b1689c5..9a8d3d4c8 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/ServerFeatureSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/ServerFeatureSupport.java @@ -36,17 +36,23 @@ protected class ServerFeatureMojoUtil extends ServerFeatureUtil { @Override public void debug(String msg) { - log.debug(msg); + if (isDebugEnabled()) { + log.debug(msg); + } } @Override public void debug(String msg, Throwable e) { - log.debug(msg, e); + if (isDebugEnabled()) { + log.debug(msg, e); + } } @Override public void debug(Throwable e) { - log.debug(e); + if (isDebugEnabled()) { + log.debug(e); + } } @Override @@ -54,7 +60,7 @@ public void warn(String msg) { if (!suppressLogs) { log.warn(msg); } else { - log.debug(msg); + debug(msg); } } @@ -63,7 +69,7 @@ public void info(String msg) { if (!suppressLogs) { log.info(msg); } else { - log.debug(msg); + debug(msg); } } diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/CommonLogger.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/CommonLogger.java index 64bcc1724..76f5f5e00 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/CommonLogger.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/CommonLogger.java @@ -32,17 +32,23 @@ public static CommonLogger getInstance() { @Override public void debug(String msg) { - getLog().debug(msg); + if (isDebugEnabled()) { + getLog().debug(msg); + } } @Override public void debug(String msg, Throwable e) { - getLog().debug(msg, e); + if (isDebugEnabled()) { + getLog().debug(msg, e); + } } @Override public void debug(Throwable e) { - getLog().debug(e); + if (isDebugEnabled()) { + getLog().debug(e); + } } @Override