Skip to content

Comment on Show HN: Pg_replicate – Build Postgres replication applications in Rust

Comments

I was trying out the stdout example. Could not get it to log anything. DuckDB example worked so I went digging into the source. Apparently the stdout sink is using tracing and I did not have a `RUST_LOG` env var set.

Might be a good idea to have it documented or have the default level set to info for the stdout example.

Maybe this is common Rust knowledge and I just don't know what I'm doing though.

I too consider this a footgun.

Most applications will have something like

   tracing_subscriber::registry()
           .with(
               tracing_subscriber::EnvFilter::try_from_default_env()
                   .unwrap_or_else(|_| "my_app=info".into()),
           )
           .with(tracing_subscriber::fmt::layer())
           .init();

in the `main.rs` which will default the tracing if RUST_LOG env var is not set.

Thanks for trying out, I'll update the code and/or the README to fix this.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.