From: W. Trevor King Date: Thu, 4 Oct 2012 13:13:05 +0000 (-0400) Subject: Add rss2email.LOG for standardized logging. X-Git-Tag: v3.0~72^2~49 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=11f1e6c05b1f81d1d204dc3bc6a7374ad1597fa8;p=rss2email.git Add rss2email.LOG for standardized logging. --- 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())