Skip to content

Commit

Permalink
fix: replace log by logger
Browse files Browse the repository at this point in the history
  • Loading branch information
WendelHime committed Nov 25, 2024
1 parent a5e1ef8 commit fafdfb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ require (
go.opentelemetry.io/otel/trace v1.19.0
go.uber.org/atomic v1.10.0
golang.org/x/sys v0.23.0
google.golang.org/appengine v1.6.7
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down Expand Up @@ -1106,8 +1105,6 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
Expand Down
11 changes: 5 additions & 6 deletions services/bypass.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
mrand "math/rand"

"go.uber.org/atomic"
"google.golang.org/appengine/log"
"google.golang.org/protobuf/proto"

commonconfig "github.com/getlantern/common/config"
Expand Down Expand Up @@ -106,7 +105,7 @@ func (b *bypassService) onProxies(
for name, config := range supportedInfos {
dialer := dialers[name]
if dialer == nil {
log.Errorf("No dialer for %v", name)
logger.Errorf("No dialer for %v", name)
continue
}

Expand All @@ -127,23 +126,23 @@ func (b *bypassService) loadProxyAsync(proxyName string, config *commonconfig.Pr
select {
case err := <-dialer.Ready():
if err != nil {
log.Errorf("dialer %q initialization failed: %w", proxyName, err)
logger.Errorf("dialer %q initialization failed: %w", proxyName, err)
cancel()
return
}
b.startProxy(proxyName, config, configDir, userConfig, dialer)
readyChan <- struct{}{}
return
case <-ctx.Done():
log.Errorf("proxy %q took to long to start: %w", proxyName, ctx.Err())
logger.Errorf("proxy %q took to long to start: %w", proxyName, ctx.Err())
return
}
}()
select {
case <-readyChan:
log.Debugf("proxy ready!")
logger.Debugf("proxy ready!")
case <-ctx.Done():
log.Errorf("proxy %q took to long to start: %w", proxyName, ctx.Err())
logger.Errorf("proxy %q took to long to start: %w", proxyName, ctx.Err())
}
}

Expand Down

0 comments on commit fafdfb9

Please sign in to comment.