From e43acf6e2ac249270aab3f63c1373e042be7ee82 Mon Sep 17 00:00:00 2001 From: Kslr Date: Fri, 12 Jul 2019 14:34:38 +0800 Subject: [PATCH] add: mute access/error logger seperately https://github.com/v2ray/v2ray-core/commit/4c93d36d49c98cc41f69ed4c5e4373baef4e465a --- infra/conf/log.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/infra/conf/log.go b/infra/conf/log.go index 329849fa6..016eb2261 100644 --- a/infra/conf/log.go +++ b/infra/conf/log.go @@ -30,11 +30,15 @@ func (v *LogConfig) Build() *log.Config { 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.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.ErrorLogType = log.LogType_File }