diff --git a/infra/conf/log.go b/infra/conf/synthetic/log/log.go similarity index 99% rename from infra/conf/log.go rename to infra/conf/synthetic/log/log.go index 6a72a29eb..5cde2b512 100644 --- a/infra/conf/log.go +++ b/infra/conf/synthetic/log/log.go @@ -1,4 +1,4 @@ -package conf +package log import ( "strings" diff --git a/infra/conf/v2ray.go b/infra/conf/v2ray.go index c9f2f4336..4756710c0 100644 --- a/infra/conf/v2ray.go +++ b/infra/conf/v2ray.go @@ -3,6 +3,7 @@ package conf import ( "encoding/json" "github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader" + "github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/log" "github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router" "strings" @@ -340,7 +341,7 @@ type Config struct { // and should not be used. OutboundDetours []OutboundDetourConfig `json:"outboundDetour"` - LogConfig *LogConfig `json:"log"` + LogConfig *log.LogConfig `json:"log"` RouterConfig *router.RouterConfig `json:"routing"` DNSConfig *DNSConfig `json:"dns"` InboundConfigs []InboundDetourConfig `json:"inbounds"` @@ -433,7 +434,7 @@ func (c *Config) Build() (*core.Config, error) { if c.LogConfig != nil { logConfMsg = serial.ToTypedMessage(c.LogConfig.Build()) } else { - logConfMsg = serial.ToTypedMessage(DefaultLogConfig()) + logConfMsg = serial.ToTypedMessage(log.DefaultLogConfig()) } // let logger module be the first App to start, // so that other modules could print log during initiating