Skip to content

Commit

Permalink
[8.4](backport #1218) Use at least warning level for all status logs (#…
Browse files Browse the repository at this point in the history
…1232)

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
  • Loading branch information
mergify[bot] and joshdover authored Sep 20, 2022
1 parent a4542ef commit affe543
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
- Fix data duplication for standalone agent on Kubernetes using the default manifest {issue-beats}31512[31512] {pull}742[742]
- Agent updates will clean up unneeded artifacts. {issue}693[693] {issue}694[694] {pull}752[752]
- Fix a panic caused by a race condition when installing the Elastic Agent. {issues}806[806]
- Use at least warning level for all status logs {pull}1218[1218]
- Remove fleet event reporter and events from checkin body. {issue}993[993]

==== New features
Expand Down
7 changes: 3 additions & 4 deletions internal/pkg/core/status/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,9 @@ func (r *controller) updateStatus() {
}

func (r *controller) logStatus(status AgentStatusCode, message string) {
logFn := r.log.Infof
if status == Degraded {
logFn = r.log.Warnf
} else if status == Failed {
// Use at least warning level log for all statuses to make sure they are visible in the logs
logFn := r.log.Warnf
if status == Failed {
logFn = r.log.Errorf
}

Expand Down

0 comments on commit affe543

Please sign in to comment.