This is an anti pattern. Can we have it `is_logging_enabled()` or similar?