Skip to content

Commit

Permalink
management.Status constants could not be used directly in log (elasti…
Browse files Browse the repository at this point in the history
…c#23849)

* management.Status constants could not be used directly in log

This add stringer generator to the Status const to allow them to be
understood by a human in log.

ref: elastic#23812
  • Loading branch information
ph authored Feb 4, 2021
1 parent 3a53670 commit a52c744
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions libbeat/management/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
// Status describes the current status of the beat.
type Status int

//go:generate stringer -type=Status
const (
// Unknown is initial status when none has been reported.
Unknown Status = iota
Expand Down
46 changes: 46 additions & 0 deletions libbeat/management/status_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x-pack/elastic-agent/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- Fixed nil pointer during unenroll {pull}23609[23609]
- Fixed reenroll scenario {pull}23686[23686]
- Fixed Monitoring filebeat and metricbeat not connecting to Agent over GRPC {pull}23843[23843]
- Fixed make status readable in the log. {pull}23849[23849]

==== New features

Expand Down

0 comments on commit a52c744

Please sign in to comment.