Skip to content

docs: improve SSR error logging#5947

Merged
chenjiahan merged 1 commit intomainfrom
ssr_logging_0826
Aug 26, 2025
Merged

docs: improve SSR error logging#5947
chenjiahan merged 1 commit intomainfrom
ssr_logging_0826

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Improve the SSR error logging example. Improve the SSR error logging example. Rslog only formats the first parameter by default, so we should not pass err as the second parameter of logger.error.

Before

Screenshot 2025-08-26 at 13 46 22

After

Screenshot 2025-08-26 at 13 46 40

Checklist

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

Copilot AI review requested due to automatic review settings August 26, 2025 05:48
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 26, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 9825731
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68ad4acaf33186000805180e
😎 Deploy Preview https://deploy-preview-5947--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: 79 (🟢 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
Copy Markdown
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

Improves SSR error logging across documentation and examples to fix improper logging format. The change addresses an issue where Rslog only formats the first parameter by default, so passing the error as a second parameter resulted in poor error display.

  • Split single logger.error() calls into two separate calls for better error formatting
  • Updated both English and Chinese documentation examples
  • Applied the same fix to E2E test configurations

Reviewed Changes

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

Show a summary per file
File Description
website/docs/zh/guide/advanced/ssr.mdx Updated Chinese SSR documentation example to use proper error logging format
website/docs/zh/guide/advanced/environments.mdx Updated Chinese environments documentation example for better error logging
website/docs/en/guide/advanced/ssr.mdx Updated English SSR documentation example to use proper error logging format
website/docs/en/guide/advanced/environments.mdx Updated English environments documentation example for better error logging
e2e/cases/server/ssr/rsbuild.config.ts Applied error logging fix to SSR E2E test configuration
e2e/cases/server/ssr-type-module/rsbuild.config.ts Applied error logging fix to SSR type module E2E test configuration

@chenjiahan chenjiahan merged commit 603cea4 into main Aug 26, 2025
12 checks passed
@chenjiahan chenjiahan deleted the ssr_logging_0826 branch August 26, 2025 05:55
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.

2 participants