lazy evaluation of log fields

This commit is contained in:
v2ray committed 2016-01-18 12:24:33 +01:00
1 parent 8f20933457
commit eec0bb4db4
25 files changed
+124 -117

No files matched your search

+2 -2
View File
@@ -138,14 +138,14 @@ func JsonLoadConfig(file string) (*Config, error) {
fixedFile := os.ExpandEnv(file)
rawConfig, err := ioutil.ReadFile(fixedFile)
if err != nil {
log.Error("Failed to read server config file (%s): %v", file, err)
log.Error("Failed to read server config file (", file, "): ", file, err)
return nil, err
}
jsonConfig := &Config{}
err = json.Unmarshal(rawConfig, jsonConfig)
if err != nil {
log.Error("Failed to load server config: %v", err)
log.Error("Failed to load server config: ", err)
return nil, err
}