Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
doc: more usages of tracing filter (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
bvanjoi authored Jan 4, 2024
1 parent 77ea380 commit ce0450c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/debugging/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ Use the `RSPACK_PROFILE` environment variable for displaying trace information
RSPACK_PROFILE=TRACE=layer=logger rspack build
# filter for an event
RSPACK_PROFILE='TRACE=layer=logger&filter=rspack_core::compiler::compilation' rspack build
# with logger level
RSPACK_PROFILE='TRACE=layer=logger&filter=rspack_core::compiler::compilation=info' rspack build
# filter logs across multiple modules
RSPACK_PROFILE='TRACE=layer=logger&filter=rspack_core::compiler::compilation,rspack_core::build_chunk_graph::code_splitter' rspack build
# [fn_name] will show:
# - all functions calls to `fn_name`
# - the arguments(except for these in the `skip` list)
# - everything until this function returns
RSPACK_PROFILE='TRACE=layer=logger&filter=[build_chunk_graph]' rspack build
# compilation::chunk_asset is a custom instrument name
RSPACK_PROFILE='TRACE=layer=logger&filter=[compilation:chunk_asset]' rspack build
# log a specific function by their arguments
RSPACK_PROFILE='TRACE=layer=logger&filter=[compilation:chunk_asset{filename="main\.js"}]' rspack build
# It support regexp expression
RSPACK_PROFILE='TRACE=layer=logger&filter=[compilation:chunk_asset{filename=".*\.js"}]' rspack build
# disable ansi color escape codes
NO_COLOR=1 RSPACK_PROFILE=TRACE=layer=logger rspack build
```
Expand Down

0 comments on commit ce0450c

Please sign in to comment.