mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 02:19:25 +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
|
||||
}
|
||||
|
||||
|
@@ -64,9 +64,9 @@ func setupStore(c *cli.Context) (store.Store, error) {
|
||||
|
||||
if driver == "sqlite3" {
|
||||
if datastore.SupportedDriver("sqlite3") {
|
||||
log.Debug().Msgf("server has sqlite3 support")
|
||||
log.Debug().Msg("server has sqlite3 support")
|
||||
} else {
|
||||
log.Debug().Msgf("server was built without sqlite3 support!")
|
||||
log.Debug().Msg("server was built without sqlite3 support!")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user