Centralize logging
Author: LysandreJik
Pull request: yes

The goal of this PR is to offer a better way to manage logging to the HuggingFace/transformers users. It's a very simple proposal: implement a single logger that is shared across all files, and implement three helper methods that can be used across the library and by users:

```py
def get_logger():
    '''
    Returns the logger instance for the library, that can be managed as a traditional `logging` logger.
    '''

def get_verbosity():
    '''
    Returns the logger instance verbosity level. Used to manage what is printed, for example with tqdm loading bars.
    Same as doing:
        hf_logging.get_logger().getEffectiveLevel()
    '''

def set_verbosity(level: int):
    '''
    Sets the logger instance verbosity level. Used to set the desired verbosity level across the library.
    Same as doing:
        hf_logging.get_logger().setLevel(level)
    '''
```

Users can use these methods as such:

```py
from transformers import hf_logging

logger = hf_logging.get_logger()

hf_logging.set_verbosity(hf_logging.INFO)
# same as doing
logger.setLevel(hf_logging.INFO)
```

The noteworthy additions/changes are shown below.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=h1) Report
> Merging [#6434](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/461ae86812f9d75762bbdae2ac5776f9a5d702ea?el=desc) will **increase** coverage by `0.46%`.
> The diff coverage is `91.58%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6434/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6434      +/-   ##
==========================================
+ Coverage   79.63%   80.09%   +0.46%     
==========================================
  Files         156      157       +1     
  Lines       28420    28471      +51     
==========================================
+ Hits        22631    22805     +174     
+ Misses       5789     5666     -123     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/commands/convert.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb21tYW5kcy9jb252ZXJ0LnB5) | `0.00% <0.00%> (ø)` | |
| [src/transformers/commands/run.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb21tYW5kcy9ydW4ucHk=) | `0.00% <0.00%> (ø)` | |
| [src/transformers/commands/serving.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb21tYW5kcy9zZXJ2aW5nLnB5) | `0.00% <0.00%> (ø)` | |
| [src/transformers/commands/train.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb21tYW5kcy90cmFpbi5weQ==) | `0.00% <0.00%> (ø)` | |
| [src/transformers/configuration\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2F1dG8ucHk=) | `93.18% <ø> (-0.30%)` | :arrow_down: |
| [src/transformers/data/metrics/squad\_metrics.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL21ldHJpY3Mvc3F1YWRfbWV0cmljcy5weQ==) | `0.00% <0.00%> (ø)` | |
| [src/transformers/benchmark/benchmark\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9iZW5jaG1hcmsvYmVuY2htYXJrX3V0aWxzLnB5) | `69.50% <66.66%> (ø)` | |
| [src/transformers/utils/logging.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy91dGlscy9sb2dnaW5nLnB5) | `75.00% <75.00%> (ø)` | |
| [src/transformers/\_\_init\_\_.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `99.28% <100.00%> (ø)` | |
| [src/transformers/activations.py](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9hY3RpdmF0aW9ucy5weQ==) | `90.00% <100.00%> (ø)` | |
| ... and [132 more](https://codecov.io/gh/huggingface/transformers/pull/6434/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=footer). Last update [461ae86...c81c035](https://codecov.io/gh/huggingface/transformers/pull/6434?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Looks good to me as well! I'm thinking that it might be a good idea to create one helper function for each verbosity level:
```
hf_logger.set_info_verbosity()
hf_logger.set_warning_verbosity()
hf_logger.set_debug_verbosity()
```

These functions might be easier to remember...what do you think @LysandreJik ?


> Looks good to me as well! I'm thinking that it might be a good idea to create one helper function for each verbosity level:
> 
> ```
> hf_logger.set_info_verbosity()
> hf_logger.set_warning_verbosity()
> hf_logger.set_debug_verbosity()
> ```
> 
> These functions might be easier to remember...what do you think @LysandreJik ?

For a simpler completion, I would rather call these:
```
hf_logger.set_verbosity_info()
hf_logger.set_verbosity_warning()
hf_logger.set_verbosity_debug()
hf_logger.set_verbosity_error()  # This one is important as well, to basically disactivate all infos/warnings
```


h