Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Use boost log attributes when logging RLPX handshake messages #5573

@halfalicious

Description

@halfalicious

There are a few pieces of information which are being manually logged in each RLPX handshake message:

  • Was this connection initiated by the local node or a remote node i.e. connection direction ("egress" or "ingress")
  • Remote node id (pubkey)
  • Remote node address (if available i.e. if Aleth is still connected to the remote node)

Example log message:

TRACE 04-16 09:53:10 p2p rlpx auth to ##a979fb57…@52.16.188.185:30303

Manually logging this data in each message makes the log statements unnecessarily long - for example:

LOG(m_logger) << connectionDirectionString() << "auth from " << m_remote << "@"
<< m_socket->remoteEndpoint();

We should instead use boost logging attributes to automatically include this information in each log message. Details are available here:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions