mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Enforce log.WithError(err) static analysis and fix all violations (#11163)
* Use log.WithError static analysis from #11143 and fix all violations * Fix another log violation after pulling from develop * Update beacon-chain/sync/pending_blocks_queue.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * @potuz feedback * Copy paste fail * fix tests Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Potuz <potuz@prysmaticlabs.com>
This commit is contained in:
@@ -109,7 +109,7 @@ func (s *Service) healthzHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if err := writeResponse(w, r, response); err != nil {
|
||||
log.Errorf("Error writing response: %v", err)
|
||||
log.WithError(err).Error("Error writing response")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ func (s *Service) Start() {
|
||||
log.WithField("address", s.server.Addr).Debug("Starting prometheus service")
|
||||
err := s.server.ListenAndServe()
|
||||
if err != nil && err != http.ErrServerClosed {
|
||||
log.Errorf("Could not listen to host:port :%s: %v", s.server.Addr, err)
|
||||
log.WithError(err).Errorf("Could not listen to host:port :%s", s.server.Addr)
|
||||
s.failStatus = err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user