Don't duplicate the 'if' check. Makes the 2nd condition easier to read also and avoid empty 'if' when logging is disabled.