Skip to content

feat: astro logger#13787

Open
ematipico wants to merge 6 commits intomainfrom
feat/astro-logger
Open

feat: astro logger#13787
ematipico wants to merge 6 commits intomainfrom
feat/astro-logger

Conversation

@ematipico
Copy link
Copy Markdown
Member

@ematipico ematipico commented Apr 22, 2026

Description (required)

This PR adds documentation for the upcoming experimental logger. The RFC is here: withastro/roadmap#1339

Linear: AST-84

For Astro version: 6.2.0. See astro PR #16437.

The attached PR is the one that mostly documents the new APIs

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit c7c6e53
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/69f0bb2af0033400088d0b4f
😎 Deploy Preview https://deploy-preview-13787--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Apr 22, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/reference/experimental-flags/logger.mdx Localization added, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

Thanks Ema! I left a few suggestions mostly around:

  • docs style, consistency with other experimental pages
  • and some reorganization to make it easier to scan. For example I find the API block placement a bit annoying currently:
API block between the introductory sentence and the list

Also, I noticed you mentioned the AstroLoggerDestination but I don't think we document its exact shape at the moment. It would be helpful to have a "Types reference" section with the public types/types required to build a custom logger.

Then, when the feature becomes stable we only need to reorganize the contents, everything would already be here.

For example, the experimental Route caching has an API reference but we could also use the same format used in the other references (e.g. Renderer types).

Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
@ArmandPhilippot ArmandPhilippot added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) minor-release For the next minor release; in the milestone, "merge queue" = approved for merging on release day. labels Apr 22, 2026
@ArmandPhilippot ArmandPhilippot added this to the 6.2 milestone Apr 22, 2026
@ematipico
Copy link
Copy Markdown
Member Author

Also, I noticed you mentioned the AstroLoggerDestination but I don't think we document its exact shape at the moment. It would be helpful to have a "Types reference" section with the public types/types required to build a custom logger.

I was hoping to get some suggestions on where to have it, and if it needs an header

@ArmandPhilippot
Copy link
Copy Markdown
Member

If there is only one useful type, a reference section might not be the best approach and we could reshape Custom loggers with something similar to session drivers:

A type reference section

(we don't necessarily need to show write(), etc. in the sidebar, this was just to show the hierarchy)

Otherwise, a new section at the end might be easier to organize the content. Each section only describe what is available and we add links to the relevant types for advanced users. This remains easy to scan without having to scroll too much for those not interested in building their own logger. Something like:

A building a custom logger section

And we have precedents for both approaches, so the structure remains familiar to users.

ematipico and others added 3 commits April 24, 2026 13:43
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@ematipico
Copy link
Copy Markdown
Member Author

Hey @ArmandPhilippot , I added more information to the page. Let me know what you think

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, @ematipico !

I left a few suggestions, most of them try to shorten/simplify the wording or add links when we can. And one of them is pretty big: if we replace your list with sections, we can link to them directly when needed and this might be easier to scan.

Feel free to disagree. 😄 After that, it looks ready to me!

Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

Thanks Ema, this looks ready to me! 🫡

Copy link
Copy Markdown
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

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

Great work @ematipico, I have a few typo/nit and grammar suggestions and it should be good to go after applied! 🙌

Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Comment thread src/content/docs/en/reference/experimental-flags/logger.mdx Outdated
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) minor-release For the next minor release; in the milestone, "merge queue" = approved for merging on release day.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants