Skip to content

Commit f8fc697

Browse files
authored
fix: update for logging (#176)
## Description Minor update in logging condition to help verify if `mvn` or `mvnw` is used. ## Checklist - [x] I have followed this repository's contributing guidelines. - [x] I will adhere to the project's code of conduct. Signed-off-by: Chao Wang <chaowan@redhat.com>
1 parent f33a7eb commit f8fc697

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/com/redhat/exhort/providers/JavaMavenProvider.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ private String selectMvnRuntime(final Path manifestPath) {
383383
try {
384384
// verify maven wrapper is accessible
385385
Operations.runProcess(manifest.getParent(), mvnw, ARG_VERSION);
386-
log.fine(String.format("using maven wrapper from : %s", mvnw));
386+
if (debugLoggingIsNeeded()) {
387+
log.info(String.format("using maven wrapper from : %s", mvnw));
388+
}
387389
return mvnw;
388390
} catch (Exception e) {
389391
log.warning(
@@ -393,7 +395,9 @@ private String selectMvnRuntime(final Path manifestPath) {
393395
}
394396
// If maven wrapper is not requested or not accessible, fall back to use mvn
395397
String mvn = Operations.getExecutable(MVN, ARG_VERSION);
396-
log.fine(String.format("using mvn executable from : %s", mvn));
398+
if (debugLoggingIsNeeded()) {
399+
log.info(String.format("using mvn executable from : %s", mvn));
400+
}
397401
return mvn;
398402
}
399403

0 commit comments

Comments
 (0)