The change done in #3964 causes the if statement to check if debug logging should be enabled to always pass.