Skip to content

Commit

Permalink
Fixed incorrect access of logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
russjones committed Feb 15, 2018
1 parent b139f72 commit 1a343de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/service/supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ func (s *LocalSupervisor) RegisterFunc(name string, fn ServiceFunc) {

// RemoveService removes service from supervisor tracking list
func (s *LocalSupervisor) RemoveService(srv Service) error {
log := log.WithFields(logrus.Fields{"service": srv.Name()})
l := logrus.WithFields(logrus.Fields{"service": srv.Name()})
s.Lock()
defer s.Unlock()
for i, el := range s.services {
if el == srv {
s.services = append(s.services[:i], s.services[i+1:]...)
log.Debugf("Service is completed and removed.")
l.Debugf("Service is completed and removed.")
return nil
}
}
log.Warningf("Service is completed but not found.")
l.Warningf("Service is completed but not found.")
return trace.NotFound("service %v is not found", srv)
}

Expand Down

0 comments on commit 1a343de

Please sign in to comment.