Skip to content

Commit 2177235

Browse files
author
Vladimir Kotal
committed
log environment with Level.FINER
should help #926
1 parent 7cb64f3 commit 2177235

File tree

1 file changed

+8
-2
lines changed
  • opengrok-indexer/src/main/java/org/opengrok/indexer/util

1 file changed

+8
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/util/Executor.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import java.lang.Thread.UncaughtExceptionHandler;
3535
import java.util.Arrays;
3636
import java.util.List;
37+
import java.util.Map;
3738
import java.util.Timer;
3839
import java.util.TimerTask;
3940
import java.util.logging.Level;
@@ -165,9 +166,14 @@ public int exec(final boolean reportExceptions, StreamHandler handler) {
165166
dir_str = cwd.toString();
166167
}
167168

169+
String env_str = "";
170+
if (LOGGER.isLoggable(Level.FINER)) {
171+
Map<String,String> env_map = processBuilder.environment();
172+
env_str = " with environment: " + env_map.toString();
173+
}
168174
LOGGER.log(Level.FINE,
169-
"Executing command {0} in directory {1}",
170-
new Object[] {cmd_str,dir_str});
175+
"Executing command {0} in directory {1}{2}",
176+
new Object[] {cmd_str, dir_str, env_str});
171177

172178
Process process = null;
173179
try {

0 commit comments

Comments
 (0)