Bas Dijkstra
02/24/2025, 7:25 AMBoris
02/24/2025, 7:31 AMBoris
02/24/2025, 7:31 AMBas Dijkstra
02/24/2025, 7:32 AM-Dpact.verifier.logLevel=DEBUG but no success yet 😞Matt (pactflow.io / pact-js / pact-go)
slf4j or logback type thing, you just need to set the log level for the packages you care about in their config file.
I think having a logback-test.xml like this in src/test/resources is all you need.
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT"/>
</root>
<logger name="au.com.dius" level="debug"/>
</configuration>
The key thing is the bottom one that specifies the log level for he pact package. The rest is going to be specific to your setup, but that hopefully gets you on your way.
Possibly even you could do this with spring application properties 🤷
TL;DR - don’t think about setting Pact’s log level, think about setting the log level for your logging framework for Pact.Bas Dijkstra
02/24/2025, 10:02 AMvar Config = new PactConfig
{
PactDir = pactDir,
LogLevel = PactLogLevel.Debug,
};
which is why I explicitly said 'Pact log level' 🙂
I didn't know Pact-JVM simply relies on the logger underneath the testMatt (pactflow.io / pact-js / pact-go)
Bas Dijkstra
02/24/2025, 10:07 AMsrc/test/resources folder did the job, by the way, so thank you very much!Matt (pactflow.io / pact-js / pact-go)