Replace fmt.Print with log.Error
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package conf
|
package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/cloudsonic/sonic-server/log"
|
||||||
@@ -55,7 +54,7 @@ func LoadFromFile(tomlFile string) {
|
|||||||
l := &multiconfig.TOMLLoader{Path: tomlFile}
|
l := &multiconfig.TOMLLoader{Path: tomlFile}
|
||||||
err := l.Load(Sonic)
|
err := l.Load(Sonic)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error loading %s: %v\n", tomlFile, err)
|
log.Error("Error loading configuration file", "file", tomlFile, err)
|
||||||
}
|
}
|
||||||
log.SetLogLevelString(Sonic.LogLevel)
|
log.SetLogLevelString(Sonic.LogLevel)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user