Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add libp2p label to chronicles log topics #794

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

LNSD
Copy link

@LNSD LNSD commented Nov 3, 2022

Added libp2p topic to the chronicles topics list. For consistency and because this is necessary to filter out all the logs with -d:"chronicles_disabled_topics=libp2p".

@LNSD LNSD requested a review from Menduist November 3, 2022 22:13
@LNSD LNSD self-assigned this Nov 3, 2022
@LNSD LNSD force-pushed the fix-log-topics-pubusbprotobuf branch from 3eb71a5 to c2e1c80 Compare November 3, 2022 22:18
@LNSD LNSD force-pushed the fix-log-topics-pubusbprotobuf branch from c2e1c80 to e50b66b Compare November 3, 2022 22:26
@LNSD LNSD changed the title Add libp2p topic to pubsub's protobuf logs Add libp2p label to chronicles log topics Nov 3, 2022
@LNSD
Copy link
Author

LNSD commented Nov 3, 2022

There is one logScope: topics which is not being applied/respected by chronicles.

https://github.com/status-im/nim-libp2p/blob/a3e9d1ed80c048cd5abc839cbe0863cefcedc702/libp2p/upgrademngrs/muxedupgrade.nim#L23-L24

I am getting logs from that module. Note that the topics label is not present in the following logs.

TRC 2022-11-03 23:30:56.929+01:00 Stream handler done                        tid=350240 conn=16U*e82fBv:6364412025e7fdd3d45a8b7b
TRC 2022-11-03 23:30:56.929+01:00 Stream handler done                        tid=350240 conn=16U*ynBmAp:6364412025e7fdd3d45a8b7d
TRC 2022-11-03 23:30:56.971+01:00 Starting stream handler                    tid=350240 conn=16U*ynBmAp:6364412025e7fdd3d45a8b7f

@Menduist Do you have any idea how this is possible?

@lchenut
Copy link
Collaborator

lchenut commented Nov 4, 2022

It's a chronicles' "problem" with procedure written inside other procedure. The ugly solution is to also write the logScope inside the parent proc. The pretty solution is to fix this inside chronicles.

@LNSD LNSD merged commit f95eda8 into unstable Nov 4, 2022
@LNSD LNSD deleted the fix-log-topics-pubusbprotobuf branch November 4, 2022 10:19
@Menduist
Copy link
Contributor

Menduist commented Nov 4, 2022

status-im/nim-chronicles#121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants