[engine] Add debug logging

This commit is contained in:
Frederic Junod 2017-07-14 09:00:47 +02:00
parent 753ac453c6
commit fe9c2835ad

View file

@ -3,10 +3,13 @@
import os import os
import time import time
import pkgutil import pkgutil
import logging
import importlib import importlib
import bumblebee.error import bumblebee.error
import bumblebee.modules import bumblebee.modules
log = logging.getLogger(__name__)
try: try:
from ConfigParser import SafeConfigParser from ConfigParser import SafeConfigParser
except ImportError: except ImportError:
@ -42,6 +45,8 @@ class Module(object):
self._configFile.read(cfg) self._configFile.read(cfg)
break break
if self._configFile is not None and self._configFile.has_section("module-parameters"):
log.debug(self._configFile.items("module-parameters"))
self._widgets = [] self._widgets = []
if widgets: if widgets:
self._widgets = widgets if isinstance(widgets, list) else [widgets] self._widgets = widgets if isinstance(widgets, list) else [widgets]