Skip to content

Commit d6c9904

Browse files
committed
Print CcmBridge logs in INFO log level
Change "Executing: [command]" and "ccmout> [log from ccm]" to INFO log level to make it easier to debug our GitHub Actions workflows. The code was simplified to remove forceErrorLogging parameter altogether. A similar change was already done in Java Driver 3.x.
1 parent bed761b commit d6c9904

File tree

1 file changed

+4
-17
lines changed
  • test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/ccm

1 file changed

+4
-17
lines changed

test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/ccm/CcmBridge.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -416,32 +416,19 @@ synchronized void executeUnsanitized(String... args) {
416416
execute(cli);
417417
}
418418

419-
private void execute(CommandLine cli) {
420-
execute(cli, false);
421-
}
422-
423419
private void executeCheckLogError() {
424420
String command = "ccm checklogerror --config-dir=" + configDirectory.toFile().getAbsolutePath();
425-
// force all logs to be error logs
426-
execute(CommandLine.parse(command), true);
421+
execute(CommandLine.parse(command));
427422
}
428423

429-
private void execute(CommandLine cli, boolean forceErrorLogging) {
430-
if (forceErrorLogging) {
431-
LOG.error("Executing: " + cli);
432-
} else {
433-
LOG.debug("Executing: " + cli);
434-
}
424+
private void execute(CommandLine cli) {
425+
LOG.info("Executing: " + cli);
435426
ExecuteWatchdog watchDog = new ExecuteWatchdog(TimeUnit.MINUTES.toMillis(10));
436427
try (LogOutputStream outStream =
437428
new LogOutputStream() {
438429
@Override
439430
protected void processLine(String line, int logLevel) {
440-
if (forceErrorLogging) {
441-
LOG.error("ccmout> {}", line);
442-
} else {
443-
LOG.debug("ccmout> {}", line);
444-
}
431+
LOG.info("ccmout> {}", line);
445432
}
446433
};
447434
LogOutputStream errStream =

0 commit comments

Comments
 (0)