Fix build with ENABLE_LOG=1 DEFAULT_LOG_SEVERITY=debug (#2419)