diff --git a/infra/conf/xray.go b/infra/conf/xray.go index 26f25cd0..f1d9fb08 100644 --- a/infra/conf/xray.go +++ b/infra/conf/xray.go @@ -522,9 +522,11 @@ func (c *Config) Build() (*core.Config, error) { config.App = append(config.App, serial.ToTypedMessage(statsConf)) } - var logConfMsg *serial.TypedMessage = serial.ToTypedMessage(DefaultLogConfig()) + var logConfMsg *serial.TypedMessage if c.LogConfig != nil { logConfMsg = serial.ToTypedMessage(c.LogConfig.Build()) + } else { + logConfMsg = serial.ToTypedMessage(DefaultLogConfig()) } // let logger module be the first App to start, // so that other modules could print log during initiating