2

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!

1

1 Answer 1

2

Try setting log_level:

std.testing.log_level = .debug;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.