From 2739cf2f4a034a0b8cf3a9120d04e034253c1e43 Mon Sep 17 00:00:00 2001 From: v2ray Date: Sun, 8 May 2016 23:01:27 -0700 Subject: [PATCH] disable access log if log level = none --- common/log/log.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/log/log.go b/common/log/log.go index 48a9b2e3..661c37e0 100644 --- a/common/log/log.go +++ b/common/log/log.go @@ -88,6 +88,10 @@ func SetLogLevel(level LogLevel) { if level <= ErrorLevel { errorLogger = streamLoggerInstance } + + if level == NoneLevel { + accessLoggerInstance = noOpLoggerInstance + } } func InitErrorLogger(file string) error {