diff --git a/xray/process.go b/xray/process.go index dbcd266a..cc96da35 100644 --- a/xray/process.go +++ b/xray/process.go @@ -13,6 +13,7 @@ import ( "time" "x-ui/config" + "x-ui/logger" "x-ui/util/common" ) @@ -149,13 +150,14 @@ func (p *process) Start() (err error) { defer func() { if err != nil { + logger.Error("Failure in running xray-core process: ", err) p.exitErr = err } }() data, err := json.MarshalIndent(p.config, "", " ") if err != nil { - return common.NewErrorf("Failure to generate XRAY configuration files: %v", err) + return common.NewErrorf("Failed to generate XRAY configuration files: %v", err) } configPath := GetConfigPath() err = os.WriteFile(configPath, data, fs.ModePerm) @@ -172,6 +174,7 @@ func (p *process) Start() (err error) { go func() { err := cmd.Run() if err != nil { + logger.Error("Failure in running xray-core: ", err) p.exitErr = err } }()