Module: reload the logging config file every __init__()

this is to allow for changing a module's logging level by changing
the config and then unload,load it
This commit is contained in:
Brian S. Stephan 2012-07-28 09:47:30 -05:00
parent f895867b86
commit ef47fd3914
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ class Module(object):
self.irc = irc
self.config = config
self.server = server
# reload file config every time
logging.config.fileConfig('logging.cfg')
self.log = logging.getLogger('drbotzo.'+self.__class__.__name__.lower())
self.is_shutdown = False