diff --git a/README.md b/README.md index 5ed5f53..3307bbd 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ $ ./bumblebee-status -l themes $ ./bumblebee-status -l modules ``` -Any parameter you can specify with `-p =`, you can alternatively specify in `~/.bumblebee-status.conf` or `~/.config/bumblebee-status.conf`. +Any parameter you can specify with `-p =`, you can alternatively specify in `~/.bumblebee-status.conf` or `~/.config/bumblebee-status.conf`. This parameters act as a **fallback**, so value specified with `-p` have priority. Configuration files have a format like this: ``` diff --git a/bumblebee/engine.py b/bumblebee/engine.py index a4e63b8..e08b639 100644 --- a/bumblebee/engine.py +++ b/bumblebee/engine.py @@ -43,6 +43,7 @@ class Module(object): if os.path.exists(cfg): self._configFile = RawConfigParser() self._configFile.read(cfg) + log.debug("reading configuration file {}".format(cfg)) break if self._configFile is not None and self._configFile.has_section("module-parameters"): @@ -77,9 +78,12 @@ class Module(object): """Return the config parameter 'name' for this module""" name = "{}.{}".format(self.name, name) value = self._config["config"].get(name, default) + log.debug("command line parameter {}={}".format(name, str(value))) if value == default: try: + log.debug("trying to read {} from configuration file".format(name)) value = self._configFile.get("module-parameters", name) + log.debug("configuration file {}={}".format(name, str(value))) except: pass return value