Skip to content

feat(astro): Streamline build logs #17301

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

Merged
merged 5 commits into from
Aug 5, 2025
Merged

feat(astro): Streamline build logs #17301

merged 5 commits into from
Aug 5, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 4, 2025

This streamlines astro build logs in two ways:

  1. Guard all logs (except the deprecation warning) behind debug: true
  2. Use the astro logger instead of console.log everywhere. This automatically prepends the message with @sentry/astro, so no need for our own prefix there - see https://docs.astro.build/en/reference/integrations-reference/#astrointegrationlogger
  3. If sourceMaps: false is explicitly set by a user, we always show a short warning, and a longer warning with more context when debug: true

@mydea mydea requested review from Lms24 and s1gr1d August 4, 2025 11:19
@mydea mydea self-assigned this Aug 4, 2025
cursor[bot]

This comment was marked as outdated.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Is this PR supposed to contain React Router and SolidStart changes as well?

@mydea
Copy link
Member Author

mydea commented Aug 4, 2025

Is this PR supposed to contain React Router and SolidStart changes as well?

oops, no, search and replace error ^^

@mydea mydea changed the title feat(astro): Streamline astro build logs feat(astro): Streamline build logs Aug 4, 2025
);
});
} else {
logger.warn('Source map generation is disabled in your Astro configuration.');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
logger.warn('Source map generation is disabled in your Astro configuration.');
logger.warn(`Source map generation is disabled in your Astro configuration (\`${settingKey}: false\`.`);

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to keep this extra compact, users can use debug: true for more information :)

@mydea mydea merged commit 64d1a46 into develop Aug 5, 2025
357 of 359 checks passed
@mydea mydea deleted the fn/astro-build-logs branch August 5, 2025 08:35
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