Selaa lähdekoodia

disable access log if log level = none

v2ray 9 vuotta sitten
vanhempi
commit
2739cf2f4a
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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 {