-
Notifications
You must be signed in to change notification settings - Fork 750
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
Debug logger namespace standardization #3692
base: master
Are you sure you want to change the base?
Conversation
…in wild-card namespaces
215484a
to
7b23b79
Compare
The logger namespaces are now using lowercase tags. trie:
verkle:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small nits
const canonicalHeadHash = (await this.getCanonicalHeadHeader()).hash() | ||
let canonicalHeadHash: Uint8Array | undefined | ||
if (this.DEBUG) { | ||
canonicalHeadHash = (await this.getCanonicalHeadHeader()).hash() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice find that this is only necessary when in debug mode 😄
@@ -352,7 +355,7 @@ export class Blockchain implements BlockchainInterface { | |||
|
|||
this.DEBUG && | |||
this._debug( | |||
`Canonical head set from ${bytesToHex(canonicalHeadHash)} to ${bytesToHex(hash!)} (number ${bigIntToHex(canonicalHead)})`, | |||
`Canonical head set from ${canonicalHeadHash ? bytesToHex(canonicalHeadHash) : 'unknown'} to ${bytesToHex(hash!)} (number ${bigIntToHex(canonicalHead)})`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this.DEBUG
is true in this case, we know canonicalHeadHash
is set, so the ? :
logic should be deleted here (if TypeScript complains, we know canonicalHeadHash
is set so you can make TS know it is set by using canonicalHeadHash!
(add exclamation mark))
| `verkle:*` | verbose debug logging for all verkle methods | | ||
| Logger | Description | | ||
| ------------------- | ------------------------------------ | | ||
| `verkle:put` | a verkle put operation has occurred | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be an addition for verkle:#
here.
@@ -466,7 +466,7 @@ The following options are available: | |||
|
|||
| Logger | Description | | |||
| ------------------- | ------------------------------------------------ | | |||
| `client:fetcher` | This option enables logging for all fetchers | | |||
| `client:fetcher:#` | This option enables logging for all fetchers | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any changes in the client code?
This change addresses the issues raised in #3689.