mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 05:09:46 +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:
@@ -69,7 +69,7 @@ func (s *WoodpeckerAuthServer) getAgent(agentID int64, agentToken string) (*mode
|
||||
agent.Capacity = -1
|
||||
err := s.store.AgentCreate(agent)
|
||||
if err != nil {
|
||||
log.Err(err).Msgf("Error creating system agent: %s", err)
|
||||
log.Error().Err(err).Msg("Error creating system agent")
|
||||
return nil, err
|
||||
}
|
||||
return agent, nil
|
||||
|
@@ -212,7 +212,7 @@ func (s *RPC) Init(c context.Context, id string, state rpc.State) error {
|
||||
Pipeline: *currentPipeline,
|
||||
})
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msgf("could not marshal JSON")
|
||||
log.Error().Err(err).Msg("could not marshal JSON")
|
||||
return
|
||||
}
|
||||
s.pubsub.Publish(message)
|
||||
|
Reference in New Issue
Block a user