1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-28 13:05:28 -05:00

lazy evaluation of log fields

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

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
}