CoreML backend should log on failure not success (#82604)
### Description
The original intention of this code was to log whenever inference fails, not whenever it succeeds. This change updates the logic of should_log to match this intention.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82604
Approved by: https://github.com/SS-JIA