Skip to content

Commit

Permalink
client: log portal client info on client start
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Jun 6, 2024
1 parent 91afb7d commit 5c2737d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,15 @@ export class EthereumClient {
)
)
this.config.logger.info(
`Initializing Ethereumjs client version=v${packageJson.version} network=${name} chainId=${chainId}`
`Initializing Ethereumjs client version=v${packageJson.version} network=${name} chainId=${chainId}}}`
)
if (this.config.portal !== undefined) {
this.config.logger.info(
`Starting Portal client. enr=${this.config.portal.discv5.enr.encodeTxt()} nodeId=0x${
this.config.portal.discv5.enr.nodeId
} networks=${[...this.config.portal.networks.values()].map((n) => n.constructor.name)}`
)
}

this.config.events.on(Event.SERVER_ERROR, (error) => {
this.config.logger.warn(`Server error: ${error.name} - ${error.message}`)
Expand Down

0 comments on commit 5c2737d

Please sign in to comment.