[tor-commits] [snowflake/main] Use log instead of fmt in proxy event logger
shelikhoo at torproject.org
shelikhoo at torproject.org
Mon Jan 31 12:04:25 UTC 2022
commit e828b0607662c7325f4d1bbf4c5072ce81f38fb9
Author: Shelikhoo <xiaokangwang at outlook.com>
Date: Fri Jan 28 14:46:45 2022 +0000
Use log instead of fmt in proxy event logger
See also:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/72#note_2772839
---
proxy/lib/pt_event_logger.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy/lib/pt_event_logger.go b/proxy/lib/pt_event_logger.go
index f6552c8..b0dbf60 100644
--- a/proxy/lib/pt_event_logger.go
+++ b/proxy/lib/pt_event_logger.go
@@ -1,8 +1,8 @@
package snowflake_proxy
import (
- "fmt"
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/task"
+ "log"
"time"
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/event"
@@ -36,7 +36,7 @@ func (p *logEventLogger) OnNewSnowflakeEvent(e event.SnowflakeEvent) {
func (p *logEventLogger) logTick() error {
inbound, inboundUnit := formatTraffic(p.inboundSum)
outbound, outboundUnit := formatTraffic(p.inboundSum)
- fmt.Printf("In the last %v, there are %v connections. Traffic Relayed â %v %v, â %v %v.\n",
+ log.Printf("In the last %v, there are %v connections. Traffic Relayed â %v %v, â %v %v.\n",
p.logPeriod.String(), p.connectionCount, inbound, inboundUnit, outbound, outboundUnit)
p.outboundSum = 0
p.inboundSum = 0
More information about the tor-commits
mailing list