Skip to content

Commit 64a6547

Browse files
committed
Improve command logging in Script class to include full command line when debugging
1 parent 30fed1a commit 64a6547

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/src/main/java/com/cloud/utils/script/Script.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ static String stackTraceAsString(Throwable throwable) {
246246
public String execute(OutputInterpreter interpreter) {
247247
String[] command = _command.toArray(new String[_command.size()]);
248248
String commandLine = buildCommandLine(command);
249-
if (_logger.isDebugEnabled() && !avoidLoggingCommand) {
250-
_logger.debug(String.format("Executing command [%s].", commandLine.split(KeyStoreUtils.KS_FILENAME)[0]));
249+
if (_logger.isDebugEnabled() ) {
250+
_logger.debug(String.format("Executing command [%s].", commandLine));
251251
}
252252

253253
try {

0 commit comments

Comments
 (0)