Re: How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread zljubisicmob
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

Re: How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread zljubisicmob
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

Re: How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread Ian Kelly
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

How to set request module logging to certain level (python 3.4.2)

2015-04-04 Thread zljubisicmob
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/