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

[Logger] Simplify how we instantiate the logger in plugins #110

Merged
merged 5 commits into from
Nov 26, 2024

Conversation

yoannmoinet
Copy link
Member

@yoannmoinet yoannmoinet commented Nov 20, 2024

What and why?

Logger requires the plugin itself to instantiate its logger, so it may do it with any name it wants.

We'd need to keep control over how we display logs from other plugins in the ecosystem.

How?

  • Pass down an already instantiated logger to all the plugins.
  • Allow plugins to create "sub-logger" if they need more granularity on what to log from sub systems.
  • Enforce all plugins to export their PLUGIN_NAME (using yarn cli integrity).
  • Add tests.

@yoannmoinet yoannmoinet marked this pull request as ready for review November 26, 2024 07:57
@yoannmoinet yoannmoinet requested a review from a team as a code owner November 26, 2024 07:57
@yoannmoinet yoannmoinet requested review from jckr and elbywan and removed request for a team and jckr November 26, 2024 07:57
@yoannmoinet yoannmoinet merged commit 2f71b18 into master Nov 26, 2024
4 checks passed
@yoannmoinet yoannmoinet deleted the yoann/simpler-logger-instantiation branch November 26, 2024 14:29
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