Skip to content

Commit 21a702e

Browse files
committed
change log.Fatal to log.Error to make subsequent os.Exit executable
Signed-off-by: Abirdcfly <[email protected]>
1 parent 88fc4e4 commit 21a702e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/easeprobe/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ func main() {
8585

8686
c, err := conf.New(yamlFile)
8787
if err != nil {
88-
log.Fatalln("Fatal: Cannot read the YAML configuration file!")
88+
log.Errorln("Fatal: Cannot read the YAML configuration file!")
8989
os.Exit(-1)
9090
}
9191

9292
// Create the pid file if the file name is not empty
9393
if len(strings.TrimSpace(c.Settings.PIDFile)) > 0 {
9494
d, err := daemon.NewPIDFile(c.Settings.PIDFile)
9595
if err != nil {
96-
log.Fatalf("Fatal: Cannot create the PID file: %s!", err)
96+
log.Errorf("Fatal: Cannot create the PID file: %s!", err)
9797
os.Exit(-1)
9898
}
9999
log.Infof("Successfully created the PID file: %s", d.PIDFile)

0 commit comments

Comments
 (0)