Fix max log level (#7851)
With the switch to tracing we did not set the `max_log_level` anymore. This resulted in a performance degradation as logging did not early exited and thus, `trace` logs were at least resolved every time. This pr fixes it by ensuring that we set the correct max log level.