Meine Protokollierungseinstellung aussehen wiePython: wie Protokollierungsanweisungen von Bibliotheken von Drittanbietern zu unterdrücken?
import requests
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('BBProposalGenerator')
Als ich das laufen, bekomme ich Protokolle als
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:BBProposalGenerator:created proposal: 763099d5-3c8a-47bc-8be8-b71a593c36ac
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:BBProposalGenerator:added offer with cubeValueId: f23f801f-7066-49a2-9f1b-1f8c64576a03
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost
INFO:BBProposalGenerator:evaluated proposal: 763099d5-3c8a-47bc-8be8-b71a593c36ac
Wie kann ich die Log-Anweisungen aus requests
Paket unterdrücken? so dass ich Protokolle von meinem Code sehen nur
INFO:BBProposalGenerator:created proposal: 763099d5-3c8a-47bc-8be8-b71a593c36ac
INFO:BBProposalGenerator:added offer with cubeValueId: f23f801f-7066-49a2-9f1b-1f8c64576a03
INFO:BBProposalGenerator:evaluated proposal: 763099d5-3c8a-47bc-8be8-b71a593c36ac
Dank
'logging.getLogger ('Anfragen'). SetLevel (logging.ERROR)'? – jfs
bekam ich die Antwort von https://stackoverflow.com/questions/11029717/how-do-i-disable-log-messages-from-the-requests-library – daydreamer