From 21a8681f7b766881c972df2efb80dcc771ad3d49 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 31 May 2017 17:12:52 +1200 Subject: kolla-build log to stderr Logging to the console would traditionally go to stderr so that stdout can be parsed by other tools for structured output. Because logging currently goes to stdout, it is difficult to parse the outputs of the following: kolla-build --format json kolla-build --list-images kolla-build --list-dependencies This change logs to stderr instead. Change-Id: Ib3995431408f3c2a9c1949ef72954f93e2bccddc Closes-Bug: #1694593 --- kolla/image/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolla/image/build.py b/kolla/image/build.py index 0d7e7ef82..8a153fabd 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -60,7 +60,7 @@ def make_a_logger(conf=None, image_name=None): log = logging.getLogger(__name__) if not log.handlers: if conf is None or not conf.logs_dir or not image_name: - handler = logging.StreamHandler(sys.stdout) + handler = logging.StreamHandler(sys.stderr) log.propagate = False else: filename = os.path.join(conf.logs_dir, "%s.log" % image_name) -- cgit v1.2.3