mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Refactor disabling the stats logger
Have Snowflake proxy periodically collect throughput stats even if the stats logger is disabled so that it can be handled by the prometheus metrics.
This commit is contained in:
parent
22d9381d9d
commit
648609dbea
3 changed files with 17 additions and 14 deletions
|
@ -97,8 +97,7 @@ func main() {
|
|||
RelayDomainNamePattern: *allowedRelayHostNamePattern,
|
||||
AllowNonTLSRelay: *allowNonTLSRelay,
|
||||
|
||||
DisableStatsLogger: *disableStatsLogger,
|
||||
SummaryInterval: *summaryInterval,
|
||||
SummaryInterval: *summaryInterval,
|
||||
}
|
||||
|
||||
var logOutput = ioutil.Discard
|
||||
|
@ -127,7 +126,7 @@ func main() {
|
|||
log.SetOutput(&safelog.LogScrubber{Output: logOutput})
|
||||
}
|
||||
|
||||
proxyEventLogger := sf.NewProxyEventLogger(eventlogOutput)
|
||||
proxyEventLogger := sf.NewProxyEventLogger(eventlogOutput, *disableStatsLogger)
|
||||
eventLogger.AddSnowflakeEventListener(proxyEventLogger)
|
||||
|
||||
if *enableMetrics {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue