fix(cli): write logger trace output to file by default#14022
Conversation
Deploying rspack with
|
| Latest commit: |
7fc08c0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d3db437e.rspack-v2.pages.dev |
| Branch Preview URL: | https://codex-logger-trace-file-defa.rspack-v2.pages.dev |
📦 Binary Size-limit
🙈 Size remains the same at 61.93MB |
Rsdoctor Bundle Diff AnalysisFound 6 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
Merging this PR will improve performance by 30.22%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR changes Rspack CLI tracing so the default logger layer output is written to a file under the generated profile directory instead of printing to stdout, and updates docs/tests to match.
Changes:
- Default
loggertrace output now writes to.rspack-profile-${timestamp}-${pid}/rspack.log(withstdout|stderrstill supported when explicitly configured). - Updated profile-related tests to assert file output instead of stdout output.
- Updated English/Chinese tracing and profiling docs to reflect the new default output behavior and output path resolution.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/optimization/profile.mdx | Updates zh profiling guide to describe rspack.log default and Perfetto output. |
| website/docs/zh/contribute/development/tracing.md | Updates zh tracing docs for new default outputs and relative-path resolution behavior. |
| website/docs/en/guide/optimization/profile.mdx | Updates en profiling guide to describe rspack.log default and Perfetto output. |
| website/docs/en/contribute/development/tracing.md | Updates en tracing docs for new default outputs and relative-path resolution behavior. |
| packages/rspack/src/trace/index.ts | Updates comments describing JS tracer behavior/output naming. |
| packages/rspack-cli/tests/build/profile/profile.test.ts | Updates tests to assert traces go to files by default and refactors cleanup. |
| packages/rspack-cli/src/utils/profile.ts | Implements new default output paths and avoids directory creation for stdout/stderr. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8b67dfa to
cd1198a
Compare
cd1198a to
7fc08c0
Compare
Summary
loggertracing layer output to.rspack-profile-${timestamp}-${pid}/rspack.loginstead of stdoutRSPACK_TRACE_OUTPUT=stdout|stderrsupportRelated links
None.
Checklist
Validation
pnpm install --frozen-lockfilepnpm run build:binding:devpnpm run build:jspnpm --filter @rspack/cli exec rstest run tests/build/profile/profile.test.ts --testTimeout 60000pnpm prettier --check packages/rspack-cli/src/utils/profile.ts packages/rspack-cli/tests/build/profile/profile.test.ts packages/rspack/src/trace/index.ts website/docs/en/contribute/development/tracing.md website/docs/zh/contribute/development/tracing.md website/docs/en/guide/optimization/profile.mdx website/docs/zh/guide/optimization/profile.mdxpnpm --dir website run check:spellgit diff --check