Turn off query logging if debug is off