From 24e0b139acf9ed84e1b9331f7629c77c6adf1cf8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 18 Nov 2007 02:52:58 -0300 Subject: [PATCH] Add logging to pymin.services.proxy module. --- pymin/services/proxy/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pymin/services/proxy/__init__.py b/pymin/services/proxy/__init__.py index a02e6c5..1e24cd4 100644 --- a/pymin/services/proxy/__init__.py +++ b/pymin/services/proxy/__init__.py @@ -1,6 +1,7 @@ # vim: set encoding=utf-8 et sw=4 sts=4 : from os import path +import logging ; log = logging.getLogger('pymin.services.proxy') from pymin.seqtools import Sequence from pymin.dispatcher import Handler, handler, HandlerError @@ -67,6 +68,7 @@ class ProxyHandler(Restorable, ConfigWriter, InitdHandler, def __init__(self, pickle_dir='.', config_dir='.'): r"Initialize DhcpHandler object, see class documentation for details." + log.debug(u'ProxyHandler(%r, %r)', pickle_dir, config_dir) self._persistent_dir = pickle_dir self._config_writer_cfg_dir = config_dir self._config_build_templates() @@ -82,6 +84,12 @@ class ProxyHandler(Restorable, ConfigWriter, InitdHandler, if __name__ == '__main__': + logging.basicConfig( + level = logging.DEBUG, + format = '%(asctime)s %(levelname)-8s %(message)s', + datefmt = '%H:%M:%S', + ) + px = ProxyHandler() px.set('ip','192.66.66.66') px.set('port','666') -- 2.43.0