Skip to content

Commit

Permalink
minor fixes (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
decentralgabe authored Apr 16, 2024
1 parent 2ba13d4 commit 52a4736
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion impl/internal/dht/getput.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ notDone:
res := s.Put(ctx, dht.NewAddr(elem.Addr.UDP()), put, token, dht.QueryRateLimiting{})
err = res.ToError()
if err != nil {
logrus.WithContext(ctx).WithError(err).Warnf("error putting to %v [token=%q]", elem.Addr, token)
logrus.WithContext(ctx).WithError(err).Debugf("error putting to %v [token=%q]", elem.Addr, token)
} else {
logrus.WithContext(ctx).WithError(err).Debugf("put to %v [token=%q]", elem.Addr, token)
}
Expand Down
4 changes: 2 additions & 2 deletions impl/pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ func NewServer(cfg *config.Config, shutdown chan os.Signal, d *dht.DHT) (*Server
func setupHandler(env config.Environment) *gin.Engine {
gin.ForceConsoleColor()
middlewares := gin.HandlersChain{
otelgin.Middleware(config.ServiceName),
gin.Recovery(),
logger(logrus.StandardLogger()),
gin.ErrorLogger(),
otelgin.Middleware(config.ServiceName),
CORS(),
logger(logrus.StandardLogger()),
}
logrus.WithField("environment", env).Info("configuring server for environment")
switch env {
Expand Down
2 changes: 1 addition & 1 deletion impl/pkg/service/pkarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (s *PkarrService) republish() {
"batch_number": batchCnt,
"success": successCnt,
"errors": errCnt,
}).Infof("batch [%d] completed with a [%.2f] percent success rate", batchCnt, successRate)
}).Infof("batch [%d] completed with a [%.2f] percent success rate", batchCnt, successRate*100)

if successRate < 0.8 {
logrus.WithContext(ctx).WithFields(logrus.Fields{
Expand Down

0 comments on commit 52a4736

Please sign in to comment.