You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-29 21:48:14 +02: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:
@@ -41,9 +41,8 @@ func Restart(ctx context.Context, store store.Store, lastPipeline *model.Pipelin
|
||||
// fetch the old pipeline config from the database
|
||||
configs, err := store.ConfigsForPipeline(lastPipeline.ID)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("failure to get pipeline config for %s. %s", repo.FullName, err)
|
||||
log.Error().Msgf(msg)
|
||||
return nil, &ErrNotFound{Msg: msg}
|
||||
log.Error().Err(err).Msgf("failure to get pipeline config for %s", repo.FullName)
|
||||
return nil, &ErrNotFound{Msg: fmt.Sprintf("failure to get pipeline config for %s. %s", repo.FullName, err)}
|
||||
}
|
||||
|
||||
for _, y := range configs {
|
||||
|
||||
Reference in New Issue
Block a user