Configure the logging at compile time

Instead of guessing it from test/release build, allow a compilation flag
to influence how much is logged. Default to debug logging, as trace is
really annoying most of the time.

Also, switch to running tests in debug mode, as we no longer need to
limit the output by release build.
1 job for logging in 1 minute and 12 seconds
Status Job ID Name Coverage
passed #2623