How to disable debug print in release modes?

Today I used -O ReleaseSafe and -O ReleaseFast for the first time to build my (the only) zig project. I’m surprised that all debug print are still enabled.

Is there a way to disable the debug print messages?

You might be looking for std.log. The default_level varies depending on the optimization mode.

3 Likes

Okay, thanks.

This should be my misunderstanding of std.debug.print. :smiley: