filer store: add mysql2

This commit is contained in:
Chris Lu
2021-01-19 17:21:50 -08:00
parent 93b3adba98
commit 52a8f1470e
7 changed files with 162 additions and 52 deletions

View File

@@ -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"+