How do I turn off logging?
State: closed | Pull request: no

How do I turn off all the logging messages in NeMo?  For example all of this:

```
[NeMo W 2020-10-30 00:16:51 experimental:28] Module <class 'nemo.collections.asr.data.audio_to_text.AudioToCharDataset'> is experimental, not ready for production and is not fully supported. Use at your own risk.
[NeMo W 2020-10-30 00:16:51 experimental:28] Module <class 'nemo.collections.asr.data.audio_to_text.AudioToBPEDataset'> is experimental, not ready for production and is not fully supported. Use at your own risk.
[NeMo W 2020-10-30 00:16:51 experimental:28] Module <class 'nemo.collections.asr.data.audio_to_text.AudioLabelDataset'> is experimental, not ready for production and is not fully supported. Use at your own risk.
[NeMo W 2020-10-30 00:16:51 experimental:28] Module <class 'nemo.collections.asr.data.audio_to_text._TarredAudioToTextDataset'> is experimental, not ready for production and is not fully supported. Use at your own risk.
[NeMo W 2020-10-30 00:16:51 experimental:28] Module <class 'nemo.collections.asr.data.audio_to_text.TarredAudioToCharDataset'> is experimental, not ready for production and is not fully supported. Use at your own risk.
[NeMo W 2020-10-30 00:16:51 experimental:28] Module <class 'nemo.collections.asr.data.audio_to_text.TarredAudioToBPEDataset'> is experimental, not ready for production and is not fully supported. Use at your own risk.
wandb: WARNING W&B installed but not logged in.  Run `wandb login` or set the WANDB_API_KEY env variable.
[NeMo W 2020-10-30 00:16:52 experimental:28] Module <class 'nemo.collections.asr.losses.ctc.CTCLoss'> is experimental, not ready for production and is not fully supported. Use at your own risk.
################################################################################
### WARNING, path does not exist: KALDI_ROOT=/mnt/matylda5/iveselyk/Tools/kaldi-trunk
###          (please add 'export KALDI_ROOT=<your_path>' in your $HOME/.profile)
###          (or run as: KALDI_ROOT=<your_path> python <your_script>.py)
################################################################################
```

This is my question too.

Try this after importing nemo modules:
```python
import logging
logging.getLogger('nemo_logger').setLevel(logging.ERROR)
```
you can choose the logging level from https://docs.python.org/3/library/logging.html#levels

[This](https://stackoverflow.com/questions/27647077/fully-disable-python-logging) does the trick, prior to importing anything from NeMo:

```
import logging
logging.disable(logging.CRITICAL)
import nemo.collections.asr
```
This won't get rid of some noise about Kaldi:

```
################################################################################
### WARNING, path does not exist: KALDI_ROOT=/tmp/kaldi
###          (please add 'export KALDI_ROOT=<your_path>' in your $HOME/.profile)
###          (or run as: KALDI_ROOT=<your_path> python <your_script>.py)
################################################################################
```

To get rid of the Kaldi warning, download Kaldi and set KALDI_ROOT.  So something like this prior to running the above script (you can put `kaldi` anywere, it doesn't have to be `/tmp`):

```
cd /tmp
git clone https://github.com/kaldi-asr/kaldi.git
export KALDI_ROOT=/tmp/kaldi
```


@burgil the initial question was posed by me for my needs.  Turning off all logging output satisfies my original question.  How do you see that as "poor" when I am the person asking and this method does exactly what I wanted it to?  Poor for who?

Another way of phrasing your comment would be to say "I see how this works for you, but for my needs that would cut out too much information, so for my application I would prefer to omit critical".

If you want to disable only NeMo loggings and not all of them, just use this:

```
logging.basicConfig(level = logging.INFO)
logging.getLogger("nemo_logger").setLevel(logging.ERROR)
```