next.js
08da80a7 - [turbopack] Fix max_level_hint to return most verbose per-target level (#93128)

Commit
13 days ago
[turbopack] Fix max_level_hint to return most verbose per-target level (#93128) ### What? Fix `FilterLayer::max_level_hint` in `turbopack-trace-utils` to return the most verbose `LevelFilter` across per-target configs instead of the least verbose one. ### Why? `tracing`'s `Subscriber` uses `max_level_hint` to short-circuit event dispatch globally: any event whose level is more verbose than the hint is dropped before `enabled()` is consulted. The previous implementation returned `self.config.values().copied().min()`, i.e. the *least* verbose configured level. As soon as any target was filtered to a low verbosity (e.g. `WARN`), events at more verbose levels (`INFO`/`DEBUG`/`TRACE`) were discarded for *all* targets, even those whose own per-target config would have allowed them. ### How? Swap `min()` → `max()` in `FilterLayer::max_level_hint` so the hint reflects the most verbose level any configured target could enable. Per-target filtering in `enabled()` is unchanged and continues to enforce the correct level for each target. <!-- NEXT_JS_LLM_PR --> --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Author
Parents
Loading