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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user