Browse Source

adjust loggin in err case

develop
Felix Kronlage-Dammers 3 months ago
parent
commit
9b0d0d57ed
  1. 9
      main.go

9
main.go

@ -211,17 +211,18 @@ func main() {
}
data, _ := ioutil.ReadAll(response.Body)
log.WithFields(logrus.Fields{"configuration": data}).Debug("Configuration received")
var targets []Target
err := json.Unmarshal(data, &targets)
if err != nil {
log.WithFields(logrus.Fields{"error": err}).Fatal("Error while processing configuration")
}
log.WithFields(logrus.Fields{
"targets": targets,
}).Infof("Targets received")
if err != nil {
log.WithFields(logrus.Fields{"error": err}).Fatal("Error while processing configuration")
}
log.WithFields(logrus.Fields{"configuration": data}).Debug("Configuration received")
workerChan := make(chan *Worker, len(targets))
i := 0

Loading…
Cancel
Save