Browse Source

disable access log if log level = none

v2ray 9 năm trước cách đây
mục cha
commit
2739cf2f4a
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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 {