forked from cerc-io/ipld-eth-server
Log error on failure to read config file
- include actual error to highlight the specific issue
This commit is contained in:
parent
7092d33338
commit
62cca62432
@ -138,8 +138,8 @@ func initConfig() {
|
||||
log.Printf("Using config file: %s\n\n", viper.ConfigFileUsed())
|
||||
} else {
|
||||
invalidConfigError := "Couldn't read config file"
|
||||
fmt.Println("Error: ", invalidConfigError)
|
||||
log.Fatal(invalidConfigError)
|
||||
formattedError := fmt.Sprintf("%s: %s", invalidConfigError, err.Error())
|
||||
log.Fatal(formattedError)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user