Looks like I have found (with your help) a solution.
Instead of:
logging.getLogger('requests.packages.urllib3').setLevel(logging.ERROR)
the line should look like:
logging.getLogger('urllib3').setLevel(logging.ERROR)
After changing the line, everything is OK.
Thank you all.
Regards.
--
http
On Saturday, April 4, 2015 at 5:23:02 PM UTC+2, Dennis Lee Bieber wrote:
> implies the correct name to use for the logger is
> "requests.packages.urllib3".
I have changed a script log_test.py. Now it looks like this:
#!/usr/bin/python3
import logging, requests
logging.basicConfig(filename="obri
On Sat, Apr 4, 2015 at 9:21 AM, Dennis Lee Bieber wrote:
> On Sat, 4 Apr 2015 06:07:12 -0700 (PDT), zljubisic...@gmail.com declaimed
> the following:
> >From requests module, I would like to log from error level above.
>>
>
> Unless the requests module documents that is uses a logger named
Hi,
if I execute:
import logging, requests
logging.basicConfig(filename="obrisi.log", level=10, format='%(asctime)s
%(levelname)s %(message)s',datefmt='%d.%m.%Y %H:%M:%S')
logging.getLogger('requests').setLevel(logging.ERROR)
url = 'http://radio.hrt.hr/prvi-program/arhiva/povijest-cetvrtkom/126/