mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
lazy evaluation of log fields
This commit is contained in:
1 parent
8f20933457
commit
eec0bb4db4
25 files changed
+124
-117
No files matched your search
@@ -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