瀏覽代碼

disable access log if log level = none

v2ray 9 年之前
父節點
當前提交
2739cf2f4a
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      common/log/log.go

+ 4 - 0
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 {