diff options
author | Seth Vidal <skvidal@fedoraproject.org> | 2007-09-27 17:28:28 -0400 |
---|---|---|
committer | Seth Vidal <skvidal@fedoraproject.org> | 2007-09-27 17:28:28 -0400 |
commit | 6e428b8e9fcc784766965c3ffd85f2ee8c62c2af (patch) | |
tree | 9de4be6712c42131bd2cf37622c5351221e2a3e1 /func/logger.py | |
parent | 55bf7929f943c4ba2987e47392a517ae1b47eb81 (diff) | |
download | func-6e428b8e9fcc784766965c3ffd85f2ee8c62c2af.tar.gz func-6e428b8e9fcc784766965c3ffd85f2ee8c62c2af.tar.xz func-6e428b8e9fcc784766965c3ffd85f2ee8c62c2af.zip |
new config on logger.py
Diffstat (limited to 'func/logger.py')
-rwxr-xr-x | func/logger.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/func/logger.py b/func/logger.py index f6f9c0f..0da291c 100755 --- a/func/logger.py +++ b/func/logger.py @@ -16,7 +16,9 @@ import logging -import config_data +from func.config import read_config + +from server import FuncdConfig # from the comments in http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 @@ -33,12 +35,9 @@ class Logger(Singleton): _no_handlers = True def __init__(self, logfilepath ="/var/log/func/func.log"): - - self.config = config_data.Config().get() - if self.config.has_key("log_level"): - self.loglevel = logging._levelNames[self.config["log_level"]] - else: - self.loglevel = logging.INFO + config_file = '/etc/func/minion.conf' + self.config = read_config(config_file, FuncdConfig) + self.loglevel = logging._levelNames[self.config.log_level] self._setup_logging() if self._no_handlers: self._setup_handlers(logfilepath=logfilepath) |