[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake/main] Use log instead of fmt in proxy event logger
commit e828b0607662c7325f4d1bbf4c5072ce81f38fb9
Author: Shelikhoo <xiaokangwang@xxxxxxxxxxx>
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits