Skip to content

Commit d43d97d

Browse files
committed
Omit log prefixes
1 parent a7e4928 commit d43d97d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker-compose-rule-core/src/main/java/com/palantir/docker/compose/execution/DefaultDockerCompose.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
public final class DefaultDockerCompose implements DockerCompose {
4141

4242
public static final Version VERSION_1_7_0 = Version.valueOf("1.7.0");
43+
public static final Version VERSION_1_28_0 = Version.valueOf("1.28.0");
4344
private static final Duration LOG_TIMEOUT = Duration.standardMinutes(1);
4445
private static final Logger log = LoggerFactory.getLogger(DefaultDockerCompose.class);
4546

@@ -236,7 +237,11 @@ private Optional<String> id(String containerName) throws IOException, Interrupte
236237
private Process logs(String container) throws IOException, InterruptedException {
237238
verifyDockerComposeVersionAtLeast(
238239
VERSION_1_7_0, "You need at least docker-compose 1.7 to run docker-compose logs");
239-
return rawExecutable.execute("logs", "--no-color", container);
240+
if (version().lessThan(VERSION_1_28_0)) {
241+
return rawExecutable.execute("logs", "--no-color", container);
242+
} else {
243+
return rawExecutable.execute("logs", "--no-color", "--no-log-prefix", container);
244+
}
240245
}
241246

242247
@Override

0 commit comments

Comments
 (0)