1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00

add: mute access/error logger seperately

4c93d36d49
This commit is contained in:
Kslr 2019-07-12 14:34:38 +08:00
parent 8cf38342e9
commit e43acf6e2a

View File

@ -30,11 +30,15 @@ func (v *LogConfig) Build() *log.Config {
AccessLogType: log.LogType_Console, AccessLogType: log.LogType_Console,
} }
if len(v.AccessLog) > 0 { if v.AccessLog == "none" {
config.AccessLogType = log.LogType_None
} else if len(v.AccessLog) > 0 {
config.AccessLogPath = v.AccessLog config.AccessLogPath = v.AccessLog
config.AccessLogType = log.LogType_File config.AccessLogType = log.LogType_File
} }
if len(v.ErrorLog) > 0 { if v.ErrorLog == "none" {
config.ErrorLogType = log.LogType_None
} else if len(v.ErrorLog) > 0 {
config.ErrorLogPath = v.ErrorLog config.ErrorLogPath = v.ErrorLog
config.ErrorLogType = log.LogType_File config.ErrorLogType = log.LogType_File
} }