Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions PolicyThresholds.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Thresholds are exclusive comparisons (sev < threshold) and are provided via the
- collectLevel: collect diagnostic when severity < collectLevel (default 70)
- validationLevel: run validations when severity < validationLevel (default 30)

What `logLevel` means:
- It gates whether a diagnostic is emitted to the *evaluation environment logger* (`Symbol.for('fumifier.__logger')`).
- That logger is typically provided by the embedding application via `compiled.setLogger(...)` or per-evaluation via `runtimeOptions.logger`.
- This is distinct from any global application log filtering (e.g. a conventional `LOG_LEVEL` env var): `logLevel` controls fumifier policy logging decisions, not the host application's logger configuration.

A centralized policy helper simplifies decision-making:

- File: `src/utils/policy.js`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Severity (lower = more critical):

Threshold variables (bindings) control behavior:
- `throwLevel` (default 30): throw when severity < level
- `logLevel` (40): log when severity < level
- `logLevel` (40): log when severity < level (to the evaluation-environment logger set via `compiled.setLogger(...)` or `runtimeOptions.logger`)
- `collectLevel` (70): collect into diagnostics bag when severity < level
- `validationLevel` (30): run a validation only if its severity < level

Expand Down
Loading
Loading