You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
warn! output is invisible unless RUST_LOG is set #352
The PR does point at a real problem though. Even on master nothing is logged unless RUST_LOG is set, because env_logger defaults to the error level, so the mainnet warning never reaches the user:
$ bdk-cli --network=bitcoin wallets
Error: Generic error: No wallets configured yet.
$ RUST_LOG=info bdk-cli --network=bitcoin wallets
[2026-10-14T11:23:11Z WARN bdk_cli] This is experimental software and not currently recommended for use on Bitcoin mainnet, proceed with caution.
Error: Generic error: No wallets configured yet.
The mainnet notice is just the easiest one to show. It applies to every warn! in the codebase, and those fire when something has already gone wrong, so a plain run stays silent about problems the code did notice.
My take is that showing warnings by default would be more user friendly, with RUST_LOG left as a way to change that default rather than a prerequisite for seeing a warning.
@tvpeter what do you think about changing the default this way?
I'd like to work on this. Planning to default the log filter to "warn" so warnings show without RUST_LOG, while RUST_LOG still overrides it.Should the default cover all crates, or only bdk_cli?
Activity
chukwudiikeh commentedon Oct 14, 2026
I'd like to work on this. Planning to default the log filter to "warn" so warnings show without RUST_LOG, while RUST_LOG still overrides it.Should the default cover all crates, or only bdk_cli?
fix(log): show warnings by default
Merge bitcoindevkit#353: fix(log): show warnings by default