Skip to content

Commit

Permalink
Backport of Don't buffer json logs on agent startup into release/1.3.x (
Browse files Browse the repository at this point in the history
#13079)

This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-nomad-core authored May 19, 2022
1 parent 9f1f03a commit 06737c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/13076.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
agent: logs are no longer buffered at startup when logging in JSON format
```
2 changes: 2 additions & 0 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ func (c *Command) Run(args []string) int {
// Swap out UI implementation if json logging is enabled
if config.LogJson {
c.Ui = &logging.HcLogUI{Log: logger}
// Don't buffer json logs because they aren't reordered anyway.
logGate.Flush()
}

// Log config files
Expand Down

0 comments on commit 06737c4

Please sign in to comment.