Skip to content

Commit

Permalink
[Gateway] Use named loggers in all sub-components (#10639)
Browse files Browse the repository at this point in the history
  • Loading branch information
bolekk authored Sep 14, 2023
1 parent 25af2dd commit 186d1d9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/services/gateway/connectionmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func NewConnectionManager(gwConfig *config.GatewayConfig, clock utils.Clock, lgg
codec: codec,
nodes: nodes,
shutdownCh: make(chan struct{}),
lggr: lggr,
lggr: lggr.Named("DONConnectionManager." + donConfig.DonId),
}
}
connMgr := &connectionManager{
Expand Down
2 changes: 1 addition & 1 deletion core/services/gateway/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func NewGatewayConnector(config *ConnectorConfig, signer Signer, handler Gateway
signer: signer,
handler: handler,
shutdownCh: make(chan struct{}),
lggr: lggr,
lggr: lggr.Named("GatewayConnector"),
}
gateways := make(map[string]*gatewayState)
urlToId := make(map[string]string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func NewFunctionsHandlerFromConfig(handlerConfig json.RawMessage, donConfig *con
if err != nil {
return nil, err
}
lggr = lggr.Named("FunctionsHandler:" + donConfig.DonId)
var allowlist OnchainAllowlist
if cfg.OnchainAllowlist != nil {
chain, err2 := legacyChains.Get(cfg.OnchainAllowlistChainID)
Expand Down
2 changes: 1 addition & 1 deletion core/services/gateway/handlers/handler.dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewDummyHandler(donConfig *config.DONConfig, don DON, lggr logger.Logger) (
donConfig: donConfig,
don: don,
savedCallbacks: make(map[string]*savedCallback),
lggr: lggr,
lggr: lggr.Named("DummyHandler." + donConfig.DonId),
}, nil
}

Expand Down

0 comments on commit 186d1d9

Please sign in to comment.