Skip to content

warn! output is invisible unless RUST_LOG is set #352

Closed

Description

@vadim-anfv

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.

Originally posted by @vadim-anfv in #336 (comment)


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?

Activity

  1. chukwudiikeh commented on Oct 14, 2026

    @chukwudiikeh
    Contributor

    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?

  2. moved this from Todo to In Progress in BDK-CLIon Oct 14, 2026
  3. moved this from In Progress to Done in BDK-CLIon Oct 19, 2026
  4. added 2 commits that reference this issue on Oct 19, 2026
    33808be
    479ffc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions