aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/log.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-26 17:33:49 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-26 17:33:49 +0100
commit96d6237c5523e52cfb09162552091b05cc569f8a (patch)
treef554121dfcb60b0edc6a4045b51acfc47c595967 /pyaggr3g470r/log.py
parentUses the user agent defined in the configuration file. (diff)
downloadnewspipe-96d6237c5523e52cfb09162552091b05cc569f8a.tar.gz
newspipe-96d6237c5523e52cfb09162552091b05cc569f8a.tar.bz2
newspipe-96d6237c5523e52cfb09162552091b05cc569f8a.zip
Logging for the feedgetter module.
Diffstat (limited to 'pyaggr3g470r/log.py')
-rwxr-xr-xpyaggr3g470r/log.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pyaggr3g470r/log.py b/pyaggr3g470r/log.py
index 9c86be74..22834e71 100755
--- a/pyaggr3g470r/log.py
+++ b/pyaggr3g470r/log.py
@@ -20,22 +20,24 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
__author__ = "Cedric Bonhomme"
-__version__ = "$Revision: 0.1 $"
+__version__ = "$Revision: 0.2 $"
__date__ = "$Date: 2012/10/12 $"
-__revision__ = "$Date: 2012/10/12 $"
+__revision__ = "$Date: 2013/12/26 $"
__copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
+import logging
+
class Log(object):
"""
Log events. Especially events relative to authentication.
"""
- def __init__(self):
+ def __init__(self, module_name):
"""
Initialization of the logger.
"""
- import logging
- self.logger = logging.getLogger("pyaggr3g470r")
+ self.logger = logging.getLogger(module_name)
+ self.logger.propagate = False
hdlr = logging.FileHandler('./pyaggr3g470r/var/pyaggr3g470r.log')
formater = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formater)
bgstack15