`log_metrics` method of `Trainer` is using `print` instead of `logging`
### System Info

- `transformers` version: 4.20.1
- Platform: Linux-5.4.0-86-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.13
- Huggingface_hub version: 0.1.2
- PyTorch version (GPU?): 1.10.0 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No

### Who can help?

@sgugger @stas00 (related to #12276)

### Information

- [X] The official example scripts
- [X] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

run the following code snippet
``` python3
from transformers import BertConfig, Trainer, BertForSequenceClassification
trainer = Trainer(BertForSequenceClassification(BertConfig()))
trainer.log_metrics('eval', {'accuracy': 0.9})
```

### Expected behavior

I expect the output should be something like the following, which comes from `logging` library, and can be easily redirected to somewhere else with proper configuration.
```
[INFO|trainer_pt_utils.py:908] 2022-07-05 12:32:08,846 >> ***** eval metrics *****
[INFO|trainer_pt_utils.py:913] 2022-07-05 12:32:08,846 >>   accuracy = 0.9
```

The actual output comes from a `print()`, which is inconsistent with other part of this library, and cannot be easily redirected unless we just redirect `stdout` itself.
https://github.com/huggingface/transformers/blob/f0982682bd6fd0b438dda79ec45f3a8fac83a985/src/transformers/trainer_pt_utils.py#L948-L953

**BEFORE** #12276, the code looked like the following, which behaves as expected.
https://github.com/huggingface/transformers/blob/a4ed074d4b8c1ab0a1045bd86963ef209c3c467f/src/transformers/trainer_pt_utils.py#L908-L913
In short, I want to redirect logging info (including metrics) with the `logging` library, but a bare `print` does not allow me to do that.<|||||>Why are you not using `save_metrics` then? All our examples use both the prints of `log_metrics` and `save_metrics` to have them accessible in a file.<|||||>After digging the code, I realized what I want is to log the metrics of the evaluation loop, which should be handled with callbacks, and is not related to `log_metrics` or `save_metrics`.
Sorry for wrong report.<|||||>No problem, glad you found a solution!