diff --git a/main.go b/main.go index 38c73d8d87c0d248dd2841cb05b9137aeaee60e2..1fd38e371ed8da09d3ec52e877a3d210a99c4e17 100644 --- a/main.go +++ b/main.go @@ -29,11 +29,13 @@ func main() { var config Config file, err := ioutil.ReadFile(*configPath) if err != nil { - panic(err.Error()) + logrus.Error(err.Error()) + os.Exit(1) } err = yaml.Unmarshal(file, &config) if err != nil { - panic(err.Error()) + logrus.Error(err.Error()) + os.Exit(1) } for index := range config.Components { setDefaultString(&config.Components[index].Interval, "10s")