X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/b276cdc94ede3b794301573f61ce9288a51aa432..30239d67c94e6c25c09a125516c635d84c5619d8:/pymin/services/dhcp/__init__.py?ds=inline diff --git a/pymin/services/dhcp/__init__.py b/pymin/services/dhcp/__init__.py index 251553b..51f7ecb 100644 --- a/pymin/services/dhcp/__init__.py +++ b/pymin/services/dhcp/__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.dhcp') from pymin.seqtools import Sequence from pymin.dispatcher import Handler, handler, HandlerError @@ -84,10 +85,11 @@ class DhcpHandler(Restorable, ConfigWriter, ReloadHandler, TransactionalHandler, def __init__(self, pickle_dir='.', config_dir='.'): r"Initialize DhcpHandler object, see class documentation for details." + log.debug(u'DhcpHandler(%r, %r)', pickle_dir, config_dir) self._persistent_dir = pickle_dir self._config_writer_cfg_dir = config_dir self._config_build_templates() - self._restore() + InitdHandler.__init__(self) self.host = HostHandler(self) def _get_config_vars(self, config_file): @@ -96,6 +98,12 @@ class DhcpHandler(Restorable, ConfigWriter, ReloadHandler, TransactionalHandler, if __name__ == '__main__': + logging.basicConfig( + level = logging.DEBUG, + format = '%(asctime)s %(levelname)-8s %(message)s', + datefmt = '%H:%M:%S', + ) + import os h = DhcpHandler()