diff options
| author | Steve Baker <sbaker@redhat.com> | 2017-05-31 17:12:52 +1200 |
|---|---|---|
| committer | Steve Baker <sbaker@redhat.com> | 2017-06-02 13:06:17 +1200 |
| commit | 21a8681f7b766881c972df2efb80dcc771ad3d49 (patch) | |
| tree | 00561fe807c50ae744bf18d5dc910101042e4069 | |
| parent | e67409a17c21884f5898c6d8f5e485b81bf71df3 (diff) | |
| download | kolla-21a8681f7b766881c972df2efb80dcc771ad3d49.tar.gz kolla-21a8681f7b766881c972df2efb80dcc771ad3d49.zip | |
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
| -rwxr-xr-x | kolla/image/build.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
