The engine reports three things through tracing::warn!, and nobody ever
sees any of them:
// rules.rs — a pattern that is not a valid glob is dropped, not fatal
Err(e) => tracing::warn!(rule = %rule.id, pattern = %pattern,
"ignoring rule pattern that is not a valid glob: {e}"),
// rules.rs — the whole rule then matches nothing
tracing::warn!(rule = %rule.id, "rule matches nothing: {e}");
// actions.rs — a torn manifest line is skipped so the rest still list
tracing::warn!(manifest = %path.display(), "skipping unreadable manifest line: {e}");
Neither frontend installs a subscriber, so tracing drops every event on
the floor. grep -rn "tracing_subscriber" . finds nothing in the
workspace; tracing-subscriber is declared in the root
[workspace.dependencies] and no crate depends on it.
The rules cases are the ones that matter. docs/RULES.md says plainly
that a typo makes a rule match nothing — the only signal that
happened is a warning that currently goes nowhere. That becomes worse the
moment #68 lands and rules files come from outside the binary.
Small, self-contained fix: take the workspace tracing-subscriber
dependency in diskern-cli and initialise it at the top of main, e.g.
tracing_subscriber::fmt()
.with_env_filter(EnvFilter::try_from_default_env()
.unwrap_or_else(|_| EnvFilter::new("warn")))
.with_writer(std::io::stderr)
.init();
Warnings on stderr by default, RUST_LOG=debug for more, and stdout
stays clean so --json is still pipeable. The Tauri app wants the same
call in run(), where it lands in the terminal tauri dev was started
from.
crates/diskern-core/src/rules.rs:121 · crates/diskern-core/src/actions.rs:204 · crates/diskern-cli/src/main.rs:186
The engine reports three things through
tracing::warn!, and nobody eversees any of them:
Neither frontend installs a subscriber, so
tracingdrops every event onthe floor.
grep -rn "tracing_subscriber" .finds nothing in theworkspace;
tracing-subscriberis declared in the root[workspace.dependencies]and no crate depends on it.The rules cases are the ones that matter.
docs/RULES.mdsays plainlythat a typo makes a rule match nothing — the only signal that
happened is a warning that currently goes nowhere. That becomes worse the
moment #68 lands and rules files come from outside the binary.
Small, self-contained fix: take the workspace
tracing-subscriberdependency in
diskern-cliand initialise it at the top ofmain, e.g.Warnings on stderr by default,
RUST_LOG=debugfor more, and stdoutstays clean so
--jsonis still pipeable. The Tauri app wants the samecall in
run(), where it lands in the terminaltauri devwas startedfrom.
crates/diskern-core/src/rules.rs:121·crates/diskern-core/src/actions.rs:204·crates/diskern-cli/src/main.rs:186