logging: Replace LogPrint macros with regular functions #14209

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1809-logFun changing 2 files +23 −33
  1. MarcoFalke commented at 3:12 PM on September 12, 2018: member

    It is not possible to run the full test suite when configured with --enable-lcov, since logging is disabled currently so that "unnecessary branches are not analyzed". (See c8914b9dbbf6106dac3c62769f7ce3bacd8fbf9b)

    Fix this instead by replacing the macros with functions.

  2. logging: Replace LogPrint macros with regular functions fae3fbd61a
  3. MarcoFalke force-pushed on Sep 12, 2018
  4. MarcoFalke added the label Tests on Sep 12, 2018
  5. MarcoFalke added the label Refactoring on Sep 12, 2018
  6. MarcoFalke commented at 3:31 PM on September 12, 2018: member

    This should only affect test builds, so tagged with refactoring.

  7. scravy approved
  8. scravy commented at 3:40 PM on September 12, 2018: contributor

    utACK fae3fbd61a89c7a35bc0eda91b1df61371dc0936

  9. MarcoFalke commented at 3:56 PM on September 12, 2018: member

    master: screenshot_2018-09-12 lcov - total_coverage info - src net_processing cpp 1 this patch: screenshot_2018-09-12 lcov - total_coverage info - src net_processing cpp

  10. Ruteri approved
  11. Ruteri commented at 4:03 PM on September 12, 2018: none

    Since this works mostly with strings and builtins it could benefit from perfect forwarding. I took a look a the tinyformat and it looks doable in something like 2 hours (we would need to fork it).

  12. Gnappuraz approved
  13. DrahtBot commented at 4:32 PM on September 12, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->Note to reviewers: This pull request conflicts with the following ones:

    • #14158 (fix various uses of inline by arvidn)
    • #13200 (Process logs in a separate thread by jamesob)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  14. DrahtBot cross-referenced this on Sep 12, 2018 from issue fix various uses of inline by arvidn
  15. DrahtBot cross-referenced this on Sep 12, 2018 from issue Test for Windows encoding issue by ken2812221
  16. DrahtBot cross-referenced this on Sep 12, 2018 from issue Process logs in a separate thread by jamesob
  17. ryanofsky approved
  18. ryanofsky commented at 7:21 PM on September 12, 2018: contributor

    utACK fae3fbd61a89c7a35bc0eda91b1df61371dc0936

  19. practicalswift commented at 8:52 PM on September 12, 2018: contributor

    utACK fae3fbd61a89c7a35bc0eda91b1df61371dc0936

    Very nice!

  20. laanwj commented at 7:44 AM on September 13, 2018: member

    nice, replacing macros with functions is unambiguously good utACK fae3fbd61a89c7a35bc0eda91b1df61371dc0936

    I took a look a the tinyformat and it looks doable in something like 2 hours (we would need to fork it).

    This has been tried before, I don't think it was as easy as suggested. But you're welcome to try!—please do file changes to tinyformat upstream at https://github.com/c42f/tinyformat

  21. laanwj merged this on Sep 13, 2018
  22. laanwj closed this on Sep 13, 2018

  23. laanwj referenced this in commit 1bfcc0696c on Sep 13, 2018
  24. MarcoFalke deleted the branch on Sep 13, 2018
  25. Bushstar cross-referenced this on Oct 11, 2018 from issue Updates from bitcoin/master by Bushstar
  26. scravy referenced this in commit 5dd17be721 on Apr 3, 2019
  27. jkczyz cross-referenced this on Oct 17, 2019 from issue log: Add validation interface logging by jkczyz
  28. jkczyz referenced this in commit 93e8f7a833 on Oct 22, 2019
  29. jkczyz cross-referenced this on Oct 22, 2019 from issue Replace the LogPrint function with a macro by jkczyz
  30. jkczyz referenced this in commit 8734c856f8 on Oct 22, 2019
  31. MarcoFalke referenced this in commit 90a2341713 on Nov 1, 2019
  32. sidhujag referenced this in commit 30e410619b on Nov 1, 2019
  33. sidhujag referenced this in commit 98e750b015 on Nov 10, 2020
  34. kwvg referenced this in commit a017f92fe1 on Jun 16, 2021
  35. kwvg referenced this in commit 94e3a5de64 on Jun 24, 2021
  36. PastaPastaPasta referenced this in commit e8875967b5 on Jun 25, 2021
  37. random-zebra cross-referenced this on Sep 10, 2021 from issue [Util] Replace LogPrintf (but not LogPrint) macro with regular function by random-zebra
  38. PastaPastaPasta referenced this in commit d15f179eeb on Sep 11, 2021
  39. PastaPastaPasta referenced this in commit 940ae481be on Sep 11, 2021
  40. random-zebra referenced this in commit 1286d3eec0 on Sep 12, 2021
  41. PastaPastaPasta referenced this in commit 4055086f17 on Sep 12, 2021
  42. PastaPastaPasta referenced this in commit 0aff2b2c01 on Sep 12, 2021
  43. PastaPastaPasta referenced this in commit c511977b12 on Sep 12, 2021
  44. PastaPastaPasta referenced this in commit 8d3bee5e71 on Sep 14, 2021
  45. PastaPastaPasta referenced this in commit eb9c94185b on Sep 14, 2021
  46. PastaPastaPasta referenced this in commit 06583cc33b on Sep 15, 2021
  47. bitcoin locked this on Dec 16, 2021

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: 2026-05-20 06:54 UTC