Skip to content

Commit

Permalink
Setup logging
Browse files Browse the repository at this point in the history
Change-Id: I9ecf9bef5b42b2c99303436f7278c17869c07cff
  • Loading branch information
John Bresnahan committed Sep 12, 2013
1 parent e11dcc6 commit 5876e86
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions staccato/cmd/api.py
Expand Up @@ -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

Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions staccato/cmd/manage.py
Expand Up @@ -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

Expand Down Expand Up @@ -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)


Expand Down
2 changes: 2 additions & 0 deletions staccato/cmd/scheduler.py
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 5876e86

Please sign in to comment.