I'm trying to use Zig's logging functionality within my tests, but when I run the tests using the command zig build test --summary all, I don't see the log messages I expect.
What I've tried:
I've set the log level to std.log.setLevel(std.log.Level.debug)
in both the main program and the tests.
I’ve tried configuring the log level in the build.zig file by adding options for logging in the tests, but without success.
My question: How can I ensure that log messages are printed when running tests with zig build test --summary all? Is there any specific configuration needed for the tests to display logs?
Thanks in advance!
Try setting log_level:
std.testing.log_level = .debug;