log: Remove brittle and confusing LogPrintLevel #34051

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2512-log-final-cleanup changing 6 files +49 −66
  1. maflcko commented at 7:08 pm on December 11, 2025: member

    LogPrintLevel has many issues:

    • It encourages to log several levels in one source location. This is problematic, because all levels (even warnings and errors) will be rate limited equally for the same location.
    • Its warning and error logs are specially formatted compared to all other warning and error logs in the codebase, making them harder to spot (both in the debug log and in the code).
    • It is verbose to type and read.
    • It is confusing, because the majority of code uses the Log$LEVEL(...) macros. Having less ways to achieve the same makes the code more consistent and easier to review.

    Fix all issues by removing it

  2. libevent: separate log statements per level
    Avoids ratelimiting unconditional log statements when debug logging
    is enabled. Introduces slight behaviour change by removing
    the category from unconditional logs, making them more uniform
    with the other unconditional logs in the codebase.
    938702eb9b
  3. ipc: separate log statements per level
    Avoids ratelimiting unconditional log statements when debug logging
    is enabled. Introduces slight behaviour change by removing
    the category from unconditional logs, making them more uniform
    with the other unconditional logs in the codebase.
    b332e81ac3
  4. DrahtBot renamed this:
    log: Remove brittle and confusing LogPrintLevel
    log: Remove brittle and confusing LogPrintLevel
    on Dec 11, 2025
  5. DrahtBot added the label Utils/log/libs on Dec 11, 2025
  6. DrahtBot commented at 7:08 pm on December 11, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34051.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here

  7. log: Remove brittle and confusing LogPrintLevel fa35682637
  8. maflcko force-pushed on Dec 11, 2025
  9. DrahtBot added the label CI failed on Dec 11, 2025
  10. DrahtBot commented at 7:15 pm on December 11, 2025: contributor

    🚧 At least one of the CI tasks failed. Task Windows-cross to x86_64, msvcrt: https://github.com/bitcoin/bitcoin/actions/runs/20144403035/job/57820697416 LLM reason (✨ experimental): C++ syntax error in wallet/coinselection.cpp due to mismatched braces (missing/extra brace) causing end-of-input and cascading “qualified-id … before ‘(’” errors.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  11. DrahtBot removed the label CI failed on Dec 11, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-11 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me