mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
make reading error more obvious
This commit is contained in:
parent
d75bc62196
commit
11716fbf6f
|
@ -27,7 +27,7 @@ func LoadConfiguration(configFileName string, required bool) (loaded bool) {
|
||||||
glog.V(1).Infof("Reading %s.toml from %s", configFileName, viper.ConfigFileUsed())
|
glog.V(1).Infof("Reading %s.toml from %s", configFileName, viper.ConfigFileUsed())
|
||||||
|
|
||||||
if err := viper.MergeInConfig(); err != nil { // Handle errors reading the config file
|
if err := viper.MergeInConfig(); err != nil { // Handle errors reading the config file
|
||||||
glog.V(1).Infof("Reading %s: %v", viper.ConfigFileUsed(), err)
|
glog.V(0).Infof("Reading %s: %v", viper.ConfigFileUsed(), err)
|
||||||
if required {
|
if required {
|
||||||
glog.Fatalf("Failed to load %s.toml file from current directory, or $HOME/.seaweedfs/, or /etc/seaweedfs/"+
|
glog.Fatalf("Failed to load %s.toml file from current directory, or $HOME/.seaweedfs/, or /etc/seaweedfs/"+
|
||||||
"\n\nPlease use this command to generate the default %s.toml file\n"+
|
"\n\nPlease use this command to generate the default %s.toml file\n"+
|
||||||
|
|
Loading…
Reference in a new issue