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

Logging rewrite 2 #9105

Merged
merged 8 commits into from
Nov 18, 2023
Merged

Logging rewrite 2 #9105

merged 8 commits into from
Nov 18, 2023

Conversation

FredKSchott
Copy link
Member

@FredKSchott FredKSchott commented Nov 15, 2023

Note: Waiting to enter 4.0 beta period before merging this PR. If it gets out of date with main, it can be rebased (by @FredKSchott if the merge conflicts are non-trivial).

Changes

A re-attempt at #8833, scoped down.
See this comment for context: #8833 (comment)

  • A complete, holistic audit of all messages logged by the Astro CLI
  • Clarity: rewrote some info/warn/error messages to be more clear and useful
  • Consistency: reduced differences in logged icons, color, formatting, phrasing. For example, the color cyan is now (almost) always used for links.
  • Focus: removed some noisy startup logs that weren't useful
  • Focus: removed distracting debug [label] information from most logs
  • Better Errors: These changes introduced in Logging refresh #8833 have been reverted, and are no longer included in this PR.
  • Removed the unnecessary (x2), (x3), etc. effect in the dev server
  • Added consistent request logging (including render time)

Videos

logging-rewrite-old.mp4
logging-rewrite-new.mp4

Note: All error-related changes have been removed from this PR and are out-of-date in the videos above.

Screenshots

Example: (xN) Formatting Weirdness

Rewriting the CLI output would cause weird formatting issues sometimes. In this example, resizing the CLI window did it.
Screen Shot 2023-10-13 at 2 13 24 PM

Example: Consistent Formatting

Before

Screen Shot 2023-10-13 at 2 13 52 PM

After

Screen Shot 2023-10-13 at 2 14 52 PM

Build Output

Mainly stylistic, colors changed intentionally.

Before

Screen Shot 2023-10-13 at 2 27 41 PM

After

Screen Shot 2023-10-13 at 2 18 16 PM

Testing

  • Tests updated (caught a small test error in the process)

Docs

  • N/A (to confirm with docs)

Copy link

changeset-bot bot commented Nov 15, 2023

🦋 Changeset detected

Latest commit: 3d91174

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

@github-actions github-actions bot added pkg: integration Related to any renderer integration (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: astro Related to the core `astro` package (scope) labels Nov 15, 2023
@github-actions github-actions bot added pr: docs A PR that includes documentation for review semver: minor Change triggers a `minor` release labels Nov 15, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

packages/astro/src/core/build/index.ts Outdated Show resolved Hide resolved
packages/astro/src/core/create-vite.ts Outdated Show resolved Hide resolved
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Like the new logs! I've create a new next branch that you can merge this into now

@FredKSchott FredKSchott changed the base branch from main to next November 18, 2023 08:04
FredKSchott and others added 8 commits November 18, 2023 00:07
add back warning for header access

improve labels and formatting

improve error logging

remove outdated error

fix build

new error messages and hints

new error messages and hints
@FredKSchott
Copy link
Member Author

tests passing! merging into next

@FredKSchott FredKSchott merged commit 6201bbe into next Nov 18, 2023
13 checks passed
@FredKSchott FredKSchott deleted the logging-rewrite-2 branch November 18, 2023 08:38
@astrobot-houston astrobot-houston mentioned this pull request Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: integration Related to any renderer integration (scope) pr: docs A PR that includes documentation for review semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants