Skip to content

feat(astro): Streamline build logs - #17301

Merged
mydea merged 5 commits into
developfrom
fn/astro-build-logs
Aug 5, 2025
Merged

feat(astro): Streamline build logs#17301
mydea merged 5 commits into
developfrom
fn/astro-build-logs

Conversation

@mydea

@mydeamydea commented Aug 4, 2025

Copy link
Copy Markdown
Member

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 s1gr1dAugust 4, 2025 11:19
@mydeamydea self-assigned this Aug 4, 2025
cursor[bot]

This comment was marked as outdated.

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

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

mydea commented Aug 4, 2025

Copy link
Copy Markdown
MemberAuthor

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

oops, no, search and replace error ^^

@mydeamydea changed the title feat(astro): Streamline astro build logsfeat(astro): Streamline build logsAug 4, 2025
);
});
} else {
logger.warn('Source map generation is disabled in your Astro configuration.');

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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 :)

Sign up for freeto 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

@mydea@Lms24@s1gr1d