소스 검색

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 {