So I need to execute code based on the build type (release or debug).
For example I need to call function A for release binaries and function B for debug binaries.
Essentially I'm just logging variables and events.
I have seen that some sources suggest using the log crate.
I really don't want to add unnecessary dependencies just to solve a simple problem.
So I'm asking for help here
debug_assertions is usually good enough for normal cargo builds (unless custom profiles or build systems are used), you can use the cfg!() macro when used as statements in functions: