diff options
author | Seth Vidal <skvidal@fedoraproject.org> | 2007-09-20 21:28:51 -0400 |
---|---|---|
committer | Seth Vidal <skvidal@fedoraproject.org> | 2007-09-20 21:28:51 -0400 |
commit | 8d168259f1cb0af25a7ee342bd1c32cd5bfdd424 (patch) | |
tree | 9c1d80b6da18a902b03ba7b21ec6bd0a60aabbfa /server/logger.py | |
parent | a83c4bcc40aae7c8b8058d831667ee1e07a969dc (diff) | |
parent | 98010f591948fb4bf297c1c0c32def42f766edca (diff) | |
download | func-8d168259f1cb0af25a7ee342bd1c32cd5bfdd424.tar.gz func-8d168259f1cb0af25a7ee342bd1c32cd5bfdd424.tar.xz func-8d168259f1cb0af25a7ee342bd1c32cd5bfdd424.zip |
Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/func
* 'master' of ssh://git.fedoraproject.org/git/hosted/func: (27 commits)
just a friendly reminder
we are not vf_server, change I!*N domain
Add virt module.
Add test code for virt.
add a very simple, very dumb commandline client:
Remove messages.pot from po dir, since its automatically generated
Get rid of extra / in module loading error
pychecker cleanups
Add po dir to git
Prevent XMLRPC server from printing to console.
Catch FuncException when the config file is missing and exit gracefully
Implement a quickie service control module
Removing VF items + misc cleanup
Clean up some speclint warnings
Baseobj bites the dust.
remove all the --debug "try to run from the src tree" crap
debug spew cleanup to protect the unwashed masses from foo poisoning
fix up config_data to use ConfigParser correctly
attempt to let us run with --debug flag to run from src checkout
attempts at letting us run from a installed, or local modules
...
Diffstat (limited to 'server/logger.py')
-rwxr-xr-x | server/logger.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/server/logger.py b/server/logger.py index 0b9d791..fa56a3a 100755 --- a/server/logger.py +++ b/server/logger.py @@ -1,10 +1,9 @@ #!/usr/bin/python -## Virt-factory backend code. +## func ## -## Copyright 2006, Red Hat, Inc -## Michael DeHaan <mdehaan@redhat.com -## Adrian Likins <alikins@redhat.com +## Copyright 2007, Red Hat, Inc +## See AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license. @@ -29,13 +28,15 @@ class Singleton(object): # logging is weird, we don't want to setup multiple handlers # so make sure we do that mess only once + class Logger(Singleton): __no_handlers = True - def __init__(self, logfilepath ="/var/log/virt-factory/svclog"): + + def __init__(self, logfilepath ="/var/log/func/func.log"): self.config = config_data.Config().get() - if self.config.has_key("loglevel"): - self.loglevel = logging._levelNames[self.config["loglevel"]] + if self.config.has_key("log_level"): + self.loglevel = logging._levelNames[self.config["log_level"]] else: self.loglevel = logging.INFO self.__setup_logging() @@ -45,7 +46,7 @@ class Logger(Singleton): def __setup_logging(self): self.logger = logging.getLogger("svc") - def __setup_handlers(self, logfilepath="/var/log/virt-factory/svclog"): + def __setup_handlers(self, logfilepath="/var/log/func/func.log"): handler = logging.FileHandler(logfilepath, "a") self.logger.setLevel(self.loglevel) formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s") |