Skip to content

fix(metassr-watcher): replace eprintln! with tracing::error! for consistent logging#102

Open
abhicodes0324 wants to merge 1 commit intometacall:masterfrom
abhicodes0324:fix/watcher-logging
Open

fix(metassr-watcher): replace eprintln! with tracing::error! for consistent logging#102
abhicodes0324 wants to merge 1 commit intometacall:masterfrom
abhicodes0324:fix/watcher-logging

Conversation

@abhicodes0324
Copy link

Problem

FileWatcher uses eprintln! to report watch errors, while the rest of the codebase uses tracing for all logging:

eprintln!("Watch Error: {err}");

metassr-server, metassr-api-handler, and metassr-bundler all use tracing::{debug, info, warn, error} consistently. metassr-watcher is the only crate that bypasses this with a raw eprintln!, meaning file watcher errors won't appear in log files and won't respect log level filtering.

Changes

crates/metassr-watcher/src/lib.rs

  • eprintln!("Watch Error: {err}")error!("Watch error: {err}")
  • Added use tracing::error

crates/metassr-watcher/Cargo.toml

  • Added tracing.workspace = true dependency

Note

Could not verify output locally due to the MetaCall native dependency requirement. The change is a mechanical replacement verified against the existing tracing usage pattern throughout the codebase.

…istent logging

Signed-off-by: Abhiswant Chaudhary <abhicodes0324@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant