Skip to content

Commit

Permalink
Improve the go/sloth logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Oluwole Fadeyi committed Jul 1, 2023
1 parent 2314f4b commit 3a54e11
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/parser/specification/sloth/language/golang/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,13 @@ func (p *parser) warn(err error, keyValues ...interface{}) {
}

func (p *parser) stats() {
p.logger.Info("Found", "services", len(p.specs))
allSLOs := 0
for _, spec := range p.specs {
if p.kubernetes {
s := spec.(*k8sloth.PrometheusServiceLevel)
allSLOs += len(s.Spec.SLOs)
p.logger.Info("Found", "service", s.Spec.Service, "SLOs", len(s.Spec.SLOs))
} else {
s := spec.(*sloth.Spec)
allSLOs += len(s.SLOs)
p.logger.Info("Found", "service", s.Service, "SLOs", len(s.SLOs))
}
}
p.logger.Info("Found", "SLOs", allSLOs)
}

0 comments on commit 3a54e11

Please sign in to comment.