Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Logs could be better formatted #150

Closed
pipermerriam opened this issue Oct 21, 2021 · 2 comments
Closed

Logs could be better formatted #150

pipermerriam opened this issue Oct 21, 2021 · 2 comments

Comments

@pipermerriam
Copy link
Member

pipermerriam commented Oct 21, 2021

Just a few noisy logs that look like they could be formatted a bit cleaner.

Oct 21 09:05:00.672 DEBUG trin_core::portalnet::events: Got discv5 event TalkRequest(TalkRequest { id: RequestId([196, 210, 57, 99, 240, 197, 221, 216]), node_address: NodeAddress { socket_addr: 127.0.0.1:9002, node_id: NodeId { raw: [83, 16, 90, 185, 147, 162, 195, 121, 9, 136, 94, 23, 84, 78, 59, 239, 52, 43, 229, 176, 25, 240, 175, 128, 108, 162, 149, 201, 26, 199, 35, 91] } }, protocol: [115, 116, 97, 116, 101], body: [1, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0], sender: Some(UnboundedSender { chan: Tx { inner: Chan { tx: Tx { block_tail: 0x55e8980b1190, tail_position: 3 }, semaphore: 0, rx_waker: AtomicWaker, tx_count: 2, rx_fields: "..." } } }) })
Oct 21 09:05:00.672 DEBUG trin_state::events: Got state request TalkRequest { id: RequestId([196, 210, 57, 99, 240, 197, 221, 216]), node_address: NodeAddress { socket_addr: 127.0.0.1:9002, node_id: NodeId { raw: [83, 16, 90, 185, 147, 162, 195, 121, 9, 136, 94, 23, 84, 78, 59, 239, 52, 43, 229, 176, 25, 240, 175, 128, 108, 162, 149, 201, 26, 199, 35, 91] } }, protocol: [115, 116, 97, 116, 101], body: [1, 1, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0], sender: Some(UnboundedSender { chan: Tx { inner: Chan { tx: Tx { block_tail: 0x55e8980b1190, tail_position: 3 }, semaphore: 0, rx_waker: AtomicWaker, tx_count: 2, rx_fields: "..." } } }) }

And this one seems like something could be done to remove the Some(...)

Oct 21 09:19:15.141 DEBUG discv5::service: Sending RPC Request: id: 10f6e432c15e61f3: PING: enr_seq: 1 to node: Node: 0x5310..235b, addr: Some(127.0.0.1:9002)
lithp added a commit to lithp/trin that referenced this issue Oct 26, 2021
@lithp
Copy link
Contributor

lithp commented Oct 26, 2021

Opened a PR which helps with the first two messages.

Unfortunately we don't control messages emitted by discv5::service, unless Rust provides some fancy way to intercept log messages.

lithp added a commit that referenced this issue Oct 27, 2021
* Format some logs better, ref #150
@ogenev
Copy link
Member

ogenev commented Apr 20, 2022

Superseded by #167.

@ogenev ogenev closed this as completed Apr 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants