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

Redesign nextjs logging #54713

Merged
merged 68 commits into from Sep 5, 2023
Merged

Redesign nextjs logging #54713

merged 68 commits into from Sep 5, 2023

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Aug 29, 2023

The current logging styles has been existed for a while, this PR gives a fresh impression for the logging output from Next.js.
We want to achieve few new goals that makes the output clean, modernized, sweet 🍫 .

Few goals are addressed with this redesign:

Refresh Impression & Simplification

The new design of logging is much more information centralized and streamlined.

  • Given a ready message at the begining when compilers are bootstrapped.
  • Only show compiled event with green check mark indicating succesful compilation, this will merge the unclear compiling event which shows (client and server) before, now tell you the route compilation info in one line.

hello world app

next dev

After vs Before

next build

After vs Before

error status

After vs Before

Streamlization

If you have customized envs and experiments Next.js will give the brief in the early summary about your network information, env vars, and enabled experimental features

Polish

fetching logging structure

After vs Before

Dedupe Duplicates

The logging is moved from @next/env to next itself, @next/env will only notify the invoker that the env is reloaded. Then the duplicated logs for the env reloading cases can be avoid.

After vs Before

Different indicators

Use unicode text icons for different situation:

  • passed -> check mark
  • warning -> warning
  • error -> red cross
  • loading -> circle

@ijjk ijjk added area: tests Turbopack Related to Turbopack with Next.js. created-by: Next.js team PRs by the Next.js team type: next labels Aug 29, 2023
Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 1   low 0   info 0 View in Orca

@ijjk

This comment was marked as outdated.

@ijjk
Copy link
Member

ijjk commented Aug 29, 2023

Tests Passed

@vercel-spaces
Copy link

vercel-spaces bot commented Sep 2, 2023

Notifying the following users due to files changed in this PR based on this repo's notify modifiers:

@timneutkens, @ijjk, @shuding, @styfle:

packages/next/src/server/config.ts

Copy link
Member

@timneutkens timneutkens 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 Jiachi!

@kodiakhq kodiakhq bot merged commit e117c00 into canary Sep 5, 2023
90 of 97 checks passed
@kodiakhq kodiakhq bot deleted the polish-start-logs branch September 5, 2023 11:40
ijjk added a commit that referenced this pull request Sep 5, 2023
Looks liket his has been broken since
#54713 due to the text it watches
for being changed.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team locked Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants