Skip to content

add debug log statements #316

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

add debug log statements #316

wants to merge 3 commits into from

Conversation

Patel-Raj
Copy link
Contributor

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Before / After

Test Plan

@shichengripple001
Copy link
Collaborator

from the log, are we able to tell for which network it is calculating the score

@@ -233,6 +240,12 @@ class Chains {
if (skipped > 1 && skipped < 20) {
chainWithThisValidator.incomplete = true
addLedgerToChain(ledger, chainWithThisValidator)
} else {
log.info(
`DebugSkipped2:${`${next}:${ledger.ledger_index}`}:${Array.from(
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be easier to debug this data with chainWithThisValidator.id. The set of validators is probably identifying the public keys, which are not very informative (for human eyes).

@@ -153,6 +153,8 @@ class Agreement {
for (const chain of agreementChains) {
const ledger_hashes = chain.ledgers

log.info(`Debug: ${chain.id}:${Array.from(chain.validators).join(',')}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

These are useful debug logs. I would like them in the code base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved version of this log statement is merged in this PR

https://github.com/ripple/validator-history-service/pull/328/files

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