From ab7923a7b23a9041e059bbf0115d886c5068b1e3 Mon Sep 17 00:00:00 2001 From: Nikolay Starodubtsev Date: Wed, 29 Jul 2015 19:36:08 +0300 Subject: [PATCH] Fix logs loss after switching to oslo_log After switching to oslo_log api and engine logs haven't been written at all, because they were disabled. This patch take them back. Closes-Bug: 1479432 Change-Id: Ic80dc0a7b5abce0fdc1a919a05c9d613dc70dcc4 --- murano/cmd/api.py | 2 ++ murano/cmd/engine.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/murano/cmd/api.py b/murano/cmd/api.py index 1ac41a62..23a41ee6 100644 --- a/murano/cmd/api.py +++ b/murano/cmd/api.py @@ -34,6 +34,7 @@ if os.path.exists(os.path.join(root, 'murano', '__init__.py')): sys.path.insert(0, root) from oslo_config import cfg +from oslo_log import log as logging from oslo_service import service from murano.api.v1 import request_statistics @@ -53,6 +54,7 @@ def main(): request_statistics.init_stats() policy.init() + logging.setup(CONF, 'murano') launcher = service.ServiceLauncher(CONF) app = app_loader.load_paste_app('murano') diff --git a/murano/cmd/engine.py b/murano/cmd/engine.py index ff87c276..6d45dd12 100644 --- a/murano/cmd/engine.py +++ b/murano/cmd/engine.py @@ -33,6 +33,7 @@ root = os.path.join(os.path.abspath(__file__), os.pardir, os.pardir, os.pardir) if os.path.exists(os.path.join(root, 'murano', '__init__.py')): sys.path.insert(0, root) +from oslo_log import log as logging from oslo_service import service from murano.common import config @@ -45,6 +46,7 @@ def main(): try: config.parse_args() + logging.setup(CONF, 'murano') launcher = service.ServiceLauncher(CONF) launcher.launch_service(engine.get_rpc_service())