Skip to content

Commit

Permalink
don't prefix json logging
Browse files Browse the repository at this point in the history
  • Loading branch information
roccoblues committed Jan 20, 2021
1 parent 5927173 commit afa0018
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,15 @@ func (c *Command) Run(args []string) int {
return 1
}

// reset UI to prevent prefixed json output
if config.LogJson {
c.Ui = &cli.BasicUi{
Reader: os.Stdin,
Writer: os.Stdout,
ErrorWriter: os.Stderr,
}
}

// Setup the log outputs
logFilter, logGate, logOutput := SetupLoggers(c.Ui, config)
c.logFilter = logFilter
Expand Down

0 comments on commit afa0018

Please sign in to comment.