From 5876e8664d593ae31d8de59d255af15de13b7328 Mon Sep 17 00:00:00 2001 From: John Bresnahan Date: Wed, 11 Sep 2013 14:52:54 -1000 Subject: [PATCH] Setup logging Change-Id: I9ecf9bef5b42b2c99303436f7278c17869c07cff --- staccato/cmd/api.py | 3 +++ staccato/cmd/manage.py | 2 ++ staccato/cmd/scheduler.py | 2 ++ 3 files changed, 7 insertions(+) diff --git a/staccato/cmd/api.py b/staccato/cmd/api.py index 5495086..7427a3c 100755 --- a/staccato/cmd/api.py +++ b/staccato/cmd/api.py @@ -3,6 +3,7 @@ import sys from staccato.common import config +import staccato.openstack.common.log as log import staccato.openstack.common.wsgi as os_wsgi import staccato.openstack.common.pastedeploy as os_pastedeploy @@ -26,6 +27,8 @@ def main(): flavor = 'staccato-api' else: flavor = 'staccato-api-' + conf.paste_deploy.flavor + + log.setup('staccato') wsgi_app = os_pastedeploy.paste_deploy_app(paste_file, flavor, conf) diff --git a/staccato/cmd/manage.py b/staccato/cmd/manage.py index 1f88f39..a290de5 100644 --- a/staccato/cmd/manage.py +++ b/staccato/cmd/manage.py @@ -6,6 +6,7 @@ from oslo.config import cfg from staccato.common import config +import staccato.openstack.common.log as log import staccato.db import staccato.db.migration @@ -67,6 +68,7 @@ def main(): conf.register_cli_opt(command_opt) conf = config.parse_config_object(conf, skip_global=False) + log.setup('staccato') conf.command.func(conf) diff --git a/staccato/cmd/scheduler.py b/staccato/cmd/scheduler.py index 394cc85..f61ca61 100644 --- a/staccato/cmd/scheduler.py +++ b/staccato/cmd/scheduler.py @@ -3,6 +3,7 @@ import sys from staccato.common import config +import staccato.openstack.common.log as log import staccato.scheduler.interface as scheduler # Monkey patch socket and time @@ -19,6 +20,7 @@ def fail(returncode, e): def main(): try: conf = config.get_config_object() + log.setup('staccato') sched = scheduler.get_scheduler(conf) sched.start()