Skip to content

Commit

Permalink
fix(log): add create direct mode logs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgw committed Jan 15, 2024
1 parent 8b6c581 commit 5c3cba2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/pier/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func start(ctx *cli.Context) error {

pier, err := app.NewPier(repoRoot, config)
if err != nil {
loggers.Logger(loggers.Direct).Errorf("NewPier error: %s", err.Error())
return err
}

Expand Down
1 change: 1 addition & 0 deletions internal/app/pier.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func NewPier(repoRoot string, config *repo.Config) (*Pier, error) {
}

pierHA = single.New(nil, config.Appchain.ID)
loggers.Logger(loggers.Direct).Infof("create direct pier instance finished")
case repo.RelayMode:
client, err := newBitXHubClient(logger, privateKey, config)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/peermgr/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func New(config *repo.Config, nodePrivKey crypto.PrivateKey, privKey crypto.Priv

ctx, cancel := context.WithCancel(context.Background())

logger.Infof("New swarm with localID: %s, protocolIDs: %v, localAddrInfo: %s", config.Appchain.ID, protocolIDs, localAddrInfo.String())

return &Swarm{
providers: providers,
p2p: p2p,
Expand Down

0 comments on commit 5c3cba2

Please sign in to comment.