aboutsummaryrefslogtreecommitdiff
path: root/weed/util/config.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-01-19 17:21:50 -0800
committerChris Lu <chris.lu@gmail.com>2021-01-19 17:21:50 -0800
commit52a8f1470ef92b9d0075c3dccc76a4170ab30c07 (patch)
tree3bae93297aa57eb9b8c1290927f2582c21b4817d /weed/util/config.go
parent93b3adba9864dd278a778ccfe2165bcadb010574 (diff)
downloadseaweedfs-52a8f1470ef92b9d0075c3dccc76a4170ab30c07.tar.xz
seaweedfs-52a8f1470ef92b9d0075c3dccc76a4170ab30c07.zip
filer store: add mysql2
Diffstat (limited to 'weed/util/config.go')
-rw-r--r--weed/util/config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/util/config.go b/weed/util/config.go
index 2af1ad09e..ee805f26a 100644
--- a/weed/util/config.go
+++ b/weed/util/config.go
@@ -29,11 +29,11 @@ func LoadConfiguration(configFileName string, required bool) (loaded bool) {
glog.V(1).Infof("Reading %s.toml from %s", configFileName, viper.ConfigFileUsed())
if err := viper.MergeInConfig(); err != nil { // Handle errors reading the config file
- logLevel := glog.Level(0)
if strings.Contains(err.Error(), "Not Found") {
- logLevel = 1
+ glog.V(1).Infof("Reading %s: %v", viper.ConfigFileUsed(), err)
+ } else {
+ glog.Fatalf("Reading %s: %v", viper.ConfigFileUsed(), err)
}
- glog.V(logLevel).Infof("Reading %s: %v", viper.ConfigFileUsed(), err)
if required {
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"+