[BUG] Logging in a callback does not work with multiple optimizers
🐛 Bug
#5063 is not solved when logging in callbacks (@tchaton ). Specifically, self.log returns the following
File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py", line 240, in auto_reduce_results_on_epoch_end
    opt_outputs = epoch_metrics[opt_idx]
KeyError: 0
when:

there are multiple optimizers
a callback calls pl_module.log

Please reproduce using the BoringModel
https://colab.research.google.com/drive/1JoHFDQx1vad6th2IhNSxL0m2n_1HzQro?usp=sharing
Environment
the bug appears in stable or master (see notebook)
Additional context
I'm using 2 optimizers and pl_bolts.callbacks.ssl_online.SSLOnlineEvaluator which does not work as it logs the loss in the callback. (Note that there are other issues with this callback and multiple optimizers #4955 )