Skip to content

Commit

Permalink
Merge pull request #1173 from ersonp/fix/retrier-logs
Browse files Browse the repository at this point in the history
Use logging package from skycoin for retrier
  • Loading branch information
mrpalide authored May 3, 2022
2 parents b7924dc + 3e16643 commit 231dee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/apps/skysocks-client/skysocks-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"time"

"github.com/sirupsen/logrus"
"github.com/skycoin/skycoin/src/util/logging"

"github.com/skycoin/skywire-utilities/pkg/buildinfo"
"github.com/skycoin/skywire-utilities/pkg/cipher"
Expand All @@ -28,7 +28,7 @@ const (
socksPort = routing.Port(3)
)

var log = logrus.New()
var log = logging.MustGetLogger("skysocks-client")

var r = netutil.NewRetrier(log, time.Second, netutil.DefaultMaxBackoff, 0, 1)

Expand Down
4 changes: 2 additions & 2 deletions pkg/visor/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"time"

"github.com/ccding/go-stun/stun"
"github.com/sirupsen/logrus"
"github.com/skycoin/dmsg/pkg/direct"
dmsgdisc "github.com/skycoin/dmsg/pkg/disc"
"github.com/skycoin/dmsg/pkg/dmsg"
Expand Down Expand Up @@ -646,7 +645,8 @@ func vpnEnvMaker(conf *visorconfig.V1, dmsgC, dmsgDC *dmsg.Client, tpRemoteAddrs
if conf.Dmsg != nil {
envCfg.DmsgDiscovery = conf.Dmsg.Discovery

r := netutil.NewRetrier(logrus.New(), 1*time.Second, 10*time.Second, 0, 1)
log := conf.MasterLogger().PackageLogger("vpn_env_maker")
r := netutil.NewRetrier(log, 1*time.Second, 10*time.Second, 0, 1)
err := r.Do(context.Background(), func() error {
for _, ses := range dmsgC.AllSessions() {
envCfg.DmsgServers = append(envCfg.DmsgServers, ses.RemoteTCPAddr().String())
Expand Down

0 comments on commit 231dee9

Please sign in to comment.