Fix flaky test for log level
# What does this PR do?

This should fix the flakiness of the log level test. If I'm not wrong, the flakiness came from the fact the log level of Transformers can be changed by other tests (for instance lots of Trainer tests change it) and thus assuming it would be warning at the beginning of the test was wrong. Instead we test depending on the actual log level observed, which should fix the issue.
_The documentation is not available anymore as the PR was closed or merged._<|||||>Thank you for the fix. There is a remaining one test to fix however, which appears after this PR.


I am able to reproduce the issue with (deterministically)
```bash
python -m pytest tests/trainer tests/utils
```
but not with
```bash
python -m pytest tests/trainer
```
or with
```bash
python -m pytest tests/trainer/test_trainer.py -k test_log_level
```
or with the reversed order
```
python -m pytest tests/utils tests/trainer
```

**With this PR, the `test_log_level` pass with the 1st command mentioned above, but we get** 

```bash
FAILED tests/utils/test_logging.py::HfArgumentParserTest::test_advisory_warnings - AssertionError: '' != 'Testing 1, 2, 3\n'
+ Testing 1, 2, 3
```
However, on this PR again, and with
```bash
python -m pytest  tests/utils
```
or even with the reversed order
```bash
python -m pytest  tests/utils tests/trainer 
```
it pass.<|||||>The test in question didn't set any log level, so the log level was still at ERROR when running the tests in the sequence you give. I fixed it by resetting the logger at the beginning of the test.