mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 17:08:07 +00:00
Clean up logging (#3161)
- use `Err` method instead of format strings - use `Msg` if no format string is used
This commit is contained in:
@@ -62,7 +62,7 @@ func run(c *cli.Context) error {
|
||||
if c.Bool("healthcheck") {
|
||||
go func() {
|
||||
if err := http.ListenAndServe(c.String("healthcheck-addr"), nil); err != nil {
|
||||
log.Error().Msgf("cannot listen on address %s: %v", c.String("healthcheck-addr"), err)
|
||||
log.Error().Err(err).Msgf("cannot listen on address %s", c.String("healthcheck-addr"))
|
||||
}
|
||||
}()
|
||||
}
|
||||
@@ -210,7 +210,7 @@ func run(c *cli.Context) error {
|
||||
|
||||
err := client.ReportHealth(ctx)
|
||||
if err != nil {
|
||||
log.Err(err).Msgf("Failed to report health")
|
||||
log.Err(err).Msg("Failed to report health")
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user