Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Add a new --log-level flag to the Rsbuild CLI, allowing users to specify the verbosity of logs (info, warn, error, or silent).

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings June 17, 2025 07:20
@netlify
Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 2d28666
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6851179a732b1b000846799a
😎 Deploy Preview https://deploy-preview-5433--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 77 (🟢 up 6 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new --log-level flag for the Rsbuild CLI to allow users to control the verbosity of logs. The changes include documentation updates (both English and Chinese guides), new type definitions for log levels in the configuration, and updates in the CLI initialization and command registration logic, along with corresponding tests.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/docs/zh/guide/basic/cli.mdx Added documentation for the new --log-level flag
website/docs/en/guide/basic/cli.mdx Added documentation for the new --log-level flag
packages/core/src/types/config.ts Introduced LogLevel type and updated RsbuildConfig
packages/core/src/cli/init.ts Integrated logLevel option into the CLI configuration
packages/core/src/cli/commands.ts Registered --log-level flag in the command options
e2e/cases/cli/log-level/src/index.js Added a basic log output for test purposes
e2e/cases/cli/log-level/index.test.ts Added tests to verify the behavior of the log level flag
Comments suppressed due to low confidence (1)

e2e/cases/cli/log-level/index.test.ts:6

  • The test uses '--logLevel' (camel case) which is inconsistent with the defined and documented flag '--log-level'. Please update the test to match the flag naming for consistency.
const result = execSync('npx rsbuild build --logLevel info', {

@chenjiahan chenjiahan merged commit 36364e0 into main Jun 17, 2025
11 checks passed
@chenjiahan chenjiahan deleted the cli_log_level_0617 branch June 17, 2025 07:36
This was referenced Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant