-1

Here is code:

logging.basicConfig(level=logging.DEBUG)
logging = logging.getLogger(__name__)

But I getting messages from other modules: image How to get rid of it?

1 Answers1

0

It looks like your module is using chardet. One way to reduce those logs is to set the level of the logger it uses.

logging.getLogger('chardet.charsetprober').setLevel(logging.WARNING)
blues
  • 3,926
  • 2
  • 19
  • 36
  • In fact I'm using _bs4, requests, regex and urllib.parse.quote_ Ignoring _chardet_ helped but partially – Kezif Garbian Sep 30 '19 at 15:33
  • you can get a list of loggers as described [here](https://stackoverflow.com/questions/53249304/how-to-get-the-list-all-existing-loggers-using-python-logging-module) and change those that you are not interested in. – blues Sep 30 '19 at 21:06