From 11f1e6c05b1f81d1d204dc3bc6a7374ad1597fa8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 4 Oct 2012 09:13:05 -0400 Subject: [PATCH] Add rss2email.LOG for standardized logging. --- rss2email.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rss2email.py b/rss2email.py index e5488ab..6972173 100755 --- a/rss2email.py +++ b/rss2email.py @@ -37,6 +37,7 @@ from email.header import Header as _Header from email.utils import parseaddr as _parseaddr from email.utils import formataddr as _formataddr import hashlib as _hashlib +import logging as _logging import os as _os import pickle as _pickle import smtplib as _smtplib @@ -64,6 +65,11 @@ import feedparser as _feedparser import html2text as _html2text +LOG = _logging.getLogger('rss2email') +LOG.addHandler(_logging.StreamHandler()) +LOG.setLevel(_logging.ERROR) + + _urllib_request.install_opener(_urllib_request.build_opener()) -- 2.26.2