Skip to content

Commit

Permalink
Merge pull request #386 from hashicorp/b-375-logging-to-stderr
Browse files Browse the repository at this point in the history
if stdout isn't a terminal, send logging to stderr
  • Loading branch information
jrasell authored Dec 2, 2020
2 parents 19af3df + ec25bf9 commit be6b676
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit be6b676

Please sign in to comment.