Skip to content
Snippets Groups Projects
Verified Commit e828b060 authored by shelikhoo's avatar shelikhoo
Browse files

Use log instead of fmt in proxy event logger

parent bf3bd635
No related branches found
No related tags found
No related merge requests found
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment