Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

New verbose logger to debug output #72

Merged
merged 1 commit into from
Jun 2, 2020
Merged

Conversation

holgerd77
Copy link
Member

The current debug output triggered with e.g.

DEBUG=devp2p:* node -r ts-node/register ./examples/peer-communication.ts

is very hard follow and use for debugging since it is extremely verbose, in the case of ETH debugging output printing out dozens to hundreds of lines with the full message payloads to the CL.

This PR adds a new verbose logger for the debug output which can be used like this:

DEBUG=devp2p:*,verbose node -r ts-node/register ./examples/peer-communication.ts

This preserves the currently implemented behavior. Logging defaults now to a non-verbose output - shortening long peer IDs, block hashes and - most important - message payloads, which should be a lot friendlier for the everyday debug situation.

Exemplary verbose output:

verbose

Exemplary non-verbose output, similar situation:

non_verbose

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 87.5% when pulling 04e6537 on add-verbose-logger into 7cf880f on master.

Copy link

@evertonfraga evertonfraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the benefit is pretty obvious here :)

Before:
image

After:
image

@holgerd77
Copy link
Member Author

@evertonfraga Your example is even more convincing, thanks! 😋

@holgerd77 holgerd77 merged commit fd8a10c into master Jun 2, 2020
@holgerd77 holgerd77 deleted the add-verbose-logger branch June 2, 2020 13:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants