mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
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
This commit is contained in:
parent
bf3bd635f7
commit
e828b06076
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue