Setup logging

Change-Id: I9ecf9bef5b42b2c99303436f7278c17869c07cff
This commit is contained in:
John Bresnahan 2013-09-11 14:52:54 -10:00
parent e11dcc65ea
commit 5876e8664d
3 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import gettext
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)

View File

@ -6,6 +6,7 @@ import sys
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)

View File

@ -3,6 +3,7 @@ import gettext
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()