Skip to content

chore: cleanup libp2p logger#12058

Merged
Maddiaa0 merged 5 commits intomasterfrom
md/02-17-chore_cleanup_libp2p_logger
Feb 18, 2025
Merged

chore: cleanup libp2p logger#12058
Maddiaa0 merged 5 commits intomasterfrom
md/02-17-chore_cleanup_libp2p_logger

Conversation

@Maddiaa0
Copy link
Member

@Maddiaa0 Maddiaa0 commented Feb 17, 2025

Overview

  • moved into foundation

  • use pino directly

  • having fixed terms lead to requiring extra parsing to deal with %p etc. strings. We really do not want to do this extra parsing as it removes the
    perforance benefits from using string replacement ( it does not do the substitution unless the log actually happens )

  • fixed terms have been removed ( only used in one place )

fixed logs were only added to aid in the p2p testbench, i will think of a different solution for this

Copy link
Member Author

Maddiaa0 commented Feb 17, 2025

@Maddiaa0 Maddiaa0 force-pushed the md/02-17-chore_cleanup_libp2p_logger branch from f835efc to 684c356 Compare February 18, 2025 11:07
@Maddiaa0 Maddiaa0 changed the base branch from md/fix-e2e-p2p-version-warnings to graphite-base/12058 February 18, 2025 11:07
@Maddiaa0 Maddiaa0 force-pushed the graphite-base/12058 branch from 505e65e to a150905 Compare February 18, 2025 11:09
@Maddiaa0 Maddiaa0 marked this pull request as ready for review February 18, 2025 11:10
@Maddiaa0 Maddiaa0 force-pushed the md/02-17-chore_cleanup_libp2p_logger branch from 684c356 to fe8b42f Compare February 18, 2025 11:39
@Maddiaa0 Maddiaa0 requested a review from spalladino February 18, 2025 11:40
@Maddiaa0 Maddiaa0 force-pushed the graphite-base/12058 branch from 6e44305 to fc8d49b Compare February 18, 2025 12:30
@Maddiaa0 Maddiaa0 force-pushed the md/02-17-chore_cleanup_libp2p_logger branch from fe8b42f to 646eadf Compare February 18, 2025 12:30
@Maddiaa0 Maddiaa0 changed the base branch from graphite-base/12058 to master February 18, 2025 12:30
Copy link
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few minor changes.

@@ -0,0 +1,48 @@
import { type ComponentLogger, type Logger } from '@libp2p/interface';
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add libp2p/interface to foundation's dev dependencies

};

return Object.assign(logFn, {
enabled: log.isLevelEnabled('debug'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I had already commented about whether this should be hardcoded, and you had replied, and I can't remember the answer.

Copy link
Member Author

Choose a reason for hiding this comment

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

Pretty much that it is extremely noisy, and we only want to be able to see it whenever we are running with LOG_LEVEL=debug and below

@@ -269,7 +268,7 @@ export class LibP2PService<T extends P2PClientType> extends WithTracer implement
}),
},
// Fix the peer id in libp2p logs so we can see the source of the log
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Fix the peer id in libp2p logs so we can see the source of the log

@Maddiaa0 Maddiaa0 enabled auto-merge (squash) February 18, 2025 13:20
@Maddiaa0 Maddiaa0 merged commit 531872f into master Feb 18, 2025
13 checks passed
@Maddiaa0 Maddiaa0 deleted the md/02-17-chore_cleanup_libp2p_logger branch February 18, 2025 13:28
TomAFrench added a commit that referenced this pull request Feb 19, 2025
* master: (245 commits)
  chore: Fix unbound CI variable on release image bootstrap (#12095)
  fix: dry run on grind (#12088)
  fix(spartan): eth-execution logging (#12094)
  fix: aws_handle_evict recovery & termination (#12086)
  chore: Use native acvm when available on orchestrator tests (#11560)
  refactor: function macros cleanup (#12066)
  refactor: remove `addNullifiedNote` from pxe (#11822)
  fix: `#[aztec]` macro warnings (#12038)
  refactor!: Notes implementing `Packable<N>` (#12004)
  chore(ops): add gcloud cli into devbox base image (#12082)
  fix: hotfix grinding
  fix: L1 deployment on reth (#12060)
  fix: Add missing bootstrap fast aliases (#12078)
  fix: hash_str caching (#12074)
  fix: Naive attempt to fix nightly deployments (#12079)
  fix: kind smoke (#12084)
  refactor!: nuking `NoteHeader` (#11942)
  fix: inject dockerhub creds (#12072)
  feat(docs): Note discovery concepts page (#11760)
  chore: cleanup libp2p logger (#12058)
  ...
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.

2 participants