-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10338 from hashicorp/dnephin/fix-logging-indent
agent: remove leading whitespace from agent log lines
- Loading branch information
Showing
7 changed files
with
127 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
agent: fix logging output by removing leading whitespace from every log line | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package cli | ||
|
||
import ( | ||
"io" | ||
|
||
mcli "github.com/mitchellh/cli" | ||
) | ||
|
||
// Ui implements the mitchellh/cli.Ui interface, while exposing the underlying | ||
// io.Writer used for stdout and stderr. | ||
// TODO: rename to UI to match golang style guide | ||
type Ui interface { | ||
mcli.Ui | ||
Stdout() io.Writer | ||
Stderr() io.Writer | ||
} | ||
|
||
// BasicUI augments mitchellh/cli.BasicUi by exposing the underlying io.Writer. | ||
type BasicUI struct { | ||
mcli.BasicUi | ||
} | ||
|
||
func (b *BasicUI) Stdout() io.Writer { | ||
return b.BasicUi.Writer | ||
} | ||
|
||
func (b *BasicUI) Stderr() io.Writer { | ||
return b.BasicUi.ErrorWriter | ||
} | ||
|
||
// Command is an alias to reduce the diff. It can be removed at any time. | ||
type Command mcli.Command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.