strimzi/test-container

Add ability to change verbosity of `io.strimzi` logging inside StrimziKafkaContainer

Closed this issue · 1 comments

Currently we have method

public StrimziKafkaContainer withKafkaLog(Level level) {
        String log4jConfig = "log4j.rootLogger=" + level.name() + ", stdout\n" +
            "log4j.appender.stdout=org.apache.log4j.ConsoleAppender\n" +
            "log4j.appender.stdout.layout=org.apache.log4j.PatternLayout\n" +
            "log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n\n";

        // Copy the custom log4j.properties into the container
        this.withCopyToContainer(
            Transferable.of(log4jConfig.getBytes(StandardCharsets.UTF_8)),
            "/opt/kafka/config/log4j.properties"
        );

        return self();
    }

but it would be great to also modify io.strimzi logger verbosity. Motivation comes from here [1]

[1] - #95 (review)

Triaged on 14.11.2024: This makes sense and should be implemented. It will be also useful to specify a package.