C
C
che_aa2020-09-27 13:06:28
Python
che_aa, 2020-09-27 13:06:28

Self logging?

The crux of the problem:
vk_api itself writes whatever it wants to the logs. I have a script that autoruns once a minute, and this script has error logs. Downloaded, opened the logs, and there:

logs
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.vk.com
INFO:vk_api:Checking remixsid...
INFO:vk_api:No remixsid
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.vk.com
INFO:vk_api:Checking remixsid...
INFO:vk_api:No remixsid
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.vk.com
INFO:vk_api:Checking remixsid...
INFO:vk_api:No remixsid
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.vk.com
INFO:vk_api:Checking remixsid...
INFO:vk_api:No remixsid
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.vk.com
INFO:vk_api:Checking remixsid...
INFO:vk_api:No remixsid
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.vk.com
INFO:vk_api:Checking remixsid...
INFO:vk_api:No remixsid

Despite the fact that I do not write infologs, and vk_api is visible in the user line. How can I avoid writing info logs from vk_api?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
javedimka, 2020-09-27
@che_aa

import logging

logger = logging.getLogger(“vk_api”)
logger.disabled = True

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question