Skip to content

[PR #30] tracing subscriber writes to stdout instead of stderr #82

@obchain

Description

@obchain

PR: #30 (feat/05-clap-cli)
File: crates/charon-cli/src/main.rs
Lines: ~42-46

Problem: tracing_subscriber::fmt() defaults to stdout. listen subcommand intended to eventually emit structured JSON to stdout for downstream consumers. Mixing log output with data output on same fd breaks that contract and silently corrupts any JSON consumer.

Fix: Add .with_writer(std::io::stderr) to fmt() builder:

tracing_subscriber::fmt()
    .with_env_filter(...)
    .with_writer(std::io::stderr)
    .init();

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p1-coreCore MVP scope

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions