Add option to log only once in multinode training
# What does this PR do?

This PR adds the option to only log on one node when doing multinode training. This is controlled by the `is_local_process_zero` method, so I apply the switch there to avoid putting in multiple places.

Fixes #11796