diff options
author | Oliver Poignant <oliver@poignant.se> | 2016-05-07 19:37:25 +0200 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2016-05-07 19:37:25 +0200 |
commit | b72fbdfe8626fb68cf430995270c104b86d5e876 (patch) | |
tree | ba07d7c2f0c69715c200f1f2150dd7c6b92471aa /gitautodeploy/gitautodeploy.py | |
parent | 703ff62ad8e386e7d9c0e545f60e46fff93ea8e5 (diff) | |
download | Git-Auto-Deploy-b72fbdfe8626fb68cf430995270c104b86d5e876.zip Git-Auto-Deploy-b72fbdfe8626fb68cf430995270c104b86d5e876.tar.gz Git-Auto-Deploy-b72fbdfe8626fb68cf430995270c104b86d5e876.tar.bz2 |
Config option to set a custom logging level
Diffstat (limited to 'gitautodeploy/gitautodeploy.py')
-rw-r--r-- | gitautodeploy/gitautodeploy.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gitautodeploy/gitautodeploy.py b/gitautodeploy/gitautodeploy.py index 5341f52..cd90846 100644 --- a/gitautodeploy/gitautodeploy.py +++ b/gitautodeploy/gitautodeploy.py @@ -243,8 +243,10 @@ class GitAutoDeploy(object): consoleHandler.setFormatter(logFormatter) logger.addHandler(consoleHandler) - # All logs are recording - logger.setLevel(logging.NOTSET) + # Set logging level + if 'log-level' in self._config: + level = logging.getLevelName(self._config['log-level']) + logger.setLevel(level) if 'logfilepath' in self._config and self._config['logfilepath']: # Translate any ~ in the path into /home/<user> |