Skip to content

Commit

Permalink
Fix for debug messages always showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking committed Apr 3, 2023
1 parent f2409d5 commit f072ada
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,31 @@ 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
public void warn(String msg) {
if (!suppressLogs) {
log.warn(msg);
} else {
log.debug(msg);
debug(msg);
}
}

Expand All @@ -63,7 +69,7 @@ public void info(String msg) {
if (!suppressLogs) {
log.info(msg);
} else {
log.debug(msg);
debug(msg);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f072ada

Please sign in to comment.