Skip to content

Commit

Permalink
Merge pull request #36 from ymakhloufi/log-noise
Browse files Browse the repository at this point in the history
Reduce log severity for lack of implementing Gatherer, Healther, Aliver
  • Loading branch information
K-Phoen authored Oct 27, 2022
2 parents a82d509 + ca7a74b commit 9bdea82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ func (s *SVC) AddWorker(name string, w Worker) {
s.logger.Fatal("Duplicate worker names!", zap.String("name", name), zap.Stack("stacktrace"))
}
if _, ok := w.(Healther); !ok {
s.logger.Warn("Worker does not implement Healther interface", zap.String("worker", name))
s.logger.Info("Worker does not implement Healther interface", zap.String("worker", name))
}
if _, ok := w.(Aliver); !ok {
s.logger.Warn("Worker does not implement Aliver interface", zap.String("worker", name))
s.logger.Info("Worker does not implement Aliver interface", zap.String("worker", name))
}
if g, ok := w.(Gatherer); ok {
s.AddGatherer(g.Gatherer())
} else {
s.logger.Warn("Worker does not implement Gatherer interface", zap.String("worker", name))
s.logger.Info("Worker does not implement Gatherer interface", zap.String("worker", name))
}
// Track workers as ordered set to initialize them in order.
s.workersAdded = append(s.workersAdded, name)
Expand Down

0 comments on commit 9bdea82

Please sign in to comment.