Merge "fix logger names"
This commit is contained in:
commit
38eb2e5389
@ -36,8 +36,6 @@ from heat import version
|
||||
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger('heat.all')
|
||||
|
||||
API_LAUNCH_OPTS = {'setup_logging': False}
|
||||
|
||||
LAUNCH_SERVICES = {
|
||||
|
@ -34,30 +34,32 @@ from heat.common import profiler
|
||||
from heat.common import wsgi
|
||||
from heat import version
|
||||
|
||||
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger('heat.api')
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def launch_api(setup_logging=True):
|
||||
if setup_logging:
|
||||
logging.register_options(cfg.CONF)
|
||||
cfg.CONF(project='heat', prog='heat-api',
|
||||
version=version.version_info.version_string())
|
||||
logging.register_options(CONF)
|
||||
CONF(project='heat', prog='heat-api',
|
||||
version=version.version_info.version_string())
|
||||
if setup_logging:
|
||||
logging.setup(cfg.CONF, 'heat-api')
|
||||
logging.setup(CONF, CONF.prog)
|
||||
LOG = logging.getLogger(CONF.prog)
|
||||
config.set_config_defaults()
|
||||
messaging.setup()
|
||||
|
||||
app = config.load_paste_app()
|
||||
|
||||
port = cfg.CONF.heat_api.bind_port
|
||||
host = cfg.CONF.heat_api.bind_host
|
||||
port = CONF.heat_api.bind_port
|
||||
host = CONF.heat_api.bind_host
|
||||
LOG.info('Starting Heat REST API on %(host)s:%(port)s',
|
||||
{'host': host, 'port': port})
|
||||
profiler.setup('heat-api', host)
|
||||
profiler.setup(CONF.prog, host)
|
||||
gmr.TextGuruMeditation.setup_autorun(version)
|
||||
server = wsgi.Server('heat-api', cfg.CONF.heat_api)
|
||||
server = wsgi.Server(CONF.prog, CONF.heat_api)
|
||||
server.start(app, default_port=port)
|
||||
return server
|
||||
|
||||
|
@ -36,32 +36,34 @@ from heat.common import profiler
|
||||
from heat.common import wsgi
|
||||
from heat import version
|
||||
|
||||
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger('heat.api.cfn')
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def launch_cfn_api(setup_logging=True):
|
||||
if setup_logging:
|
||||
logging.register_options(cfg.CONF)
|
||||
cfg.CONF(project='heat',
|
||||
prog='heat-api-cfn',
|
||||
version=version.version_info.version_string())
|
||||
logging.register_options(CONF)
|
||||
CONF(project='heat',
|
||||
prog='heat-api-cfn',
|
||||
version=version.version_info.version_string())
|
||||
if setup_logging:
|
||||
logging.setup(cfg.CONF, 'heat-api-cfn')
|
||||
logging.setup(CONF, CONF.prog)
|
||||
logging.set_defaults()
|
||||
LOG = logging.getLogger(CONF.prog)
|
||||
config.set_config_defaults()
|
||||
messaging.setup()
|
||||
|
||||
app = config.load_paste_app()
|
||||
|
||||
port = cfg.CONF.heat_api_cfn.bind_port
|
||||
host = cfg.CONF.heat_api_cfn.bind_host
|
||||
port = CONF.heat_api_cfn.bind_port
|
||||
host = CONF.heat_api_cfn.bind_host
|
||||
LOG.info('Starting Heat API on %(host)s:%(port)s',
|
||||
{'host': host, 'port': port})
|
||||
profiler.setup('heat-api-cfn', host)
|
||||
profiler.setup(CONF.prog, host)
|
||||
gmr.TextGuruMeditation.setup_autorun(version)
|
||||
server = wsgi.Server('heat-api-cfn', cfg.CONF.heat_api_cfn)
|
||||
server = wsgi.Server(CONF.prog, CONF.heat_api_cfn)
|
||||
server.start(app, default_port=port)
|
||||
return server
|
||||
|
||||
|
@ -37,19 +37,21 @@ from heat.engine import template
|
||||
from heat.rpc import api as rpc_api
|
||||
from heat import version
|
||||
|
||||
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger('heat.engine')
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def launch_engine(setup_logging=True):
|
||||
if setup_logging:
|
||||
logging.register_options(cfg.CONF)
|
||||
cfg.CONF(project='heat', prog='heat-engine',
|
||||
version=version.version_info.version_string())
|
||||
logging.register_options(CONF)
|
||||
CONF(project='heat', prog='heat-engine',
|
||||
version=version.version_info.version_string())
|
||||
if setup_logging:
|
||||
logging.setup(cfg.CONF, 'heat-engine')
|
||||
logging.setup(CONF, CONF.prog)
|
||||
logging.set_defaults()
|
||||
LOG = logging.getLogger(CONF.prog)
|
||||
messaging.setup()
|
||||
|
||||
config.startup_sanity_check()
|
||||
@ -64,14 +66,14 @@ def launch_engine(setup_logging=True):
|
||||
|
||||
from heat.engine import service as engine # noqa
|
||||
|
||||
profiler.setup('heat-engine', cfg.CONF.host)
|
||||
profiler.setup(CONF.prog, CONF.host)
|
||||
gmr.TextGuruMeditation.setup_autorun(version)
|
||||
srv = engine.EngineService(cfg.CONF.host, rpc_api.ENGINE_TOPIC)
|
||||
workers = cfg.CONF.num_engine_workers
|
||||
srv = engine.EngineService(CONF.host, rpc_api.ENGINE_TOPIC)
|
||||
workers = CONF.num_engine_workers
|
||||
if not workers:
|
||||
workers = max(4, processutils.get_worker_count())
|
||||
|
||||
launcher = service.launch(cfg.CONF, srv, workers=workers,
|
||||
launcher = service.launch(CONF, srv, workers=workers,
|
||||
restart_method='mutate')
|
||||
return launcher
|
||||
|
||||
|
@ -31,7 +31,7 @@ from heat.common import exception
|
||||
from heat.common.i18n import _
|
||||
from heat.common import password_gen
|
||||
|
||||
LOG = logging.getLogger('heat.engine.clients.keystoneclient')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
AccessKey = collections.namedtuple('AccessKey', ['id', 'access', 'secret'])
|
||||
|
||||
|
@ -27,21 +27,23 @@ from heat.common import profiler
|
||||
from heat import version as hversion
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def init_application():
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger('heat.api')
|
||||
|
||||
logging.register_options(cfg.CONF)
|
||||
logging.register_options(CONF)
|
||||
version = hversion.version_info.version_string()
|
||||
cfg.CONF(project='heat', prog='heat-api', version=version)
|
||||
logging.setup(cfg.CONF, 'heat-api')
|
||||
CONF(project='heat', prog='heat-api', version=version)
|
||||
logging.setup(CONF, CONF.prog)
|
||||
LOG = logging.getLogger(CONF.prog)
|
||||
config.set_config_defaults()
|
||||
messaging.setup()
|
||||
|
||||
port = cfg.CONF.heat_api.bind_port
|
||||
host = cfg.CONF.heat_api.bind_host
|
||||
profiler.setup('heat-api', host)
|
||||
port = CONF.heat_api.bind_port
|
||||
host = CONF.heat_api.bind_host
|
||||
profiler.setup(CONF.prog, host)
|
||||
LOG.info('Starting Heat REST API on %(host)s:%(port)s',
|
||||
{'host': host, 'port': port})
|
||||
return config.load_paste_app()
|
||||
|
@ -27,24 +27,26 @@ from heat.common import profiler
|
||||
from heat import version
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def init_application():
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger('heat.api.cfn')
|
||||
|
||||
logging.register_options(cfg.CONF)
|
||||
cfg.CONF(project='heat',
|
||||
prog='heat-api-cfn',
|
||||
version=version.version_info.version_string())
|
||||
logging.setup(cfg.CONF, 'heat-api-cfn')
|
||||
logging.register_options(CONF)
|
||||
CONF(project='heat',
|
||||
prog='heat-api-cfn',
|
||||
version=version.version_info.version_string())
|
||||
logging.setup(CONF, CONF.prog)
|
||||
logging.set_defaults()
|
||||
LOG = logging.getLogger(CONF.prog)
|
||||
config.set_config_defaults()
|
||||
messaging.setup()
|
||||
|
||||
port = cfg.CONF.heat_api_cfn.bind_port
|
||||
host = cfg.CONF.heat_api_cfn.bind_host
|
||||
port = CONF.heat_api_cfn.bind_port
|
||||
host = CONF.heat_api_cfn.bind_host
|
||||
LOG.info('Starting Heat API on %(host)s:%(port)s',
|
||||
{'host': host, 'port': port})
|
||||
profiler.setup('heat-api-cfn', host)
|
||||
profiler.setup(CONF.prog, host)
|
||||
|
||||
return config.load_paste_app()
|
||||
|
Loading…
Reference in New Issue
Block a user