log: add debugLevel setting to log_debug