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/'
wpage = requests.get(url)

the obrisi.log has the following contents:

04.04.2015 13:40:23 INFO Starting new HTTP connection (1): radio.hrt.hr
04.04.2015 13:40:23 DEBUG "GET /prvi-program/arhiva/povijest-cetvrtkom/126/ 
HTTP/1.1" 200 None

>From requests module, I would like to log from error level above.

How to achieve that (raspberry pi 2, osmc, python 3.4.2?

Regards.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to