From 208e9f9f12f7e5307d11387b9d5aa77125400443 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Tue, 1 Dec 2020 20:15:23 +0000 Subject: [PATCH 1/2] if stdout isn't a terminal, send logging to stderr --- logging/logging.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging/logging.go b/logging/logging.go index c50725ea9..11d888b18 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -60,7 +60,7 @@ func setLogFormat(format string) error { isatty.IsCygwinTerminal(os.Stdout.Fd()) { logWriter = conswriter.GetTerminal() } else { - logWriter = os.Stdout + logWriter = os.Stderr } switch format { From ec25bf98b62e37e30f2927e4a2a7b208d5c99077 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Tue, 1 Dec 2020 20:19:24 +0000 Subject: [PATCH 2/2] changelog for #386 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a127813..a9d2c03f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## UNRELEASED + +IMPROVEMENTS: + * render: when rendering, send logging to stderr if stdout is not a terminal [[GH-386](https://github.com/hashicorp/levant/pull/386)] + ## 0.3.0-beta1 (November 24, 2020) BUG FIXES: