Conversation
🦋 Changeset detectedLatest commit: ab3b54e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1eb8b13 to
9c368e4
Compare
9c368e4 to
6a4cd35
Compare
delucis
left a comment
There was a problem hiding this comment.
Changelog and public API look good to me! Thanks @ematipico 💜
|
The diff is showing all changes unrelated to a logger. Like the capitalization change to API routes. Is that a mistake? |
6a4cd35 to
ab3b54e
Compare
|
@matthewp now it should be fine |
bluwy
left a comment
There was a problem hiding this comment.
I'm still somewhat on the side that we should only expose the logger in astro:config:done, but if the rest are fine with exposing it in more hooks, I'm fine with it too 👍
|
Thank you @ematipico ! I just updated my integration to use the new |
Changes
I created two classes:
Logger, basic class. The objective of this class is to be used internally in our codebase. Ideally, we will pass around an instance of this class instead of passinglogging. I plan to make this change gradually in the future.AstroIntegrationLogger, similar toLogger, this class has thelabelstored inside of it. The main idea is that integrations should not know anything about labels.If an integration needs to do some logging with a different label - which I assume it's rare - they can use the
forkfunction, which returns a new logger which has the same logging options.Testing
Current tests should pass.
Docs
/cc @withastro/maintainers-docs for feedback!