Do not evaluate log arguments if logging is disabled

Compare with noop instead of introducing a separate variable logEnabled.