Add missing newlines to debug logging #13153

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2018_05_log_newlines changing 6 files +11 −10
  1. laanwj commented at 12:52 PM on May 2, 2018: member

    Don't we have a linter that should catch these?

  2. laanwj added the label P2P on May 2, 2018
  3. laanwj requested review from jnewbery on May 2, 2018
  4. jonasschnelli commented at 12:54 PM on May 2, 2018: contributor

    utACK 4987c2495f2910434645abe7f4fe424101cb36e3

  5. MarcoFalke commented at 1:00 PM on May 2, 2018: member

    Suggested fix for the linter:

    diff --git a/contrib/devtools/lint-logs.sh b/contrib/devtools/lint-logs.sh
    index 3bb54359a8..35be13ec19 100755
    --- a/contrib/devtools/lint-logs.sh
    +++ b/contrib/devtools/lint-logs.sh
    @@ -13,12 +13,13 @@
     # ignored
     
     
    -UNTERMINATED_LOGS=$(git grep "LogPrintf(" -- "*.cpp" | \
    +UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \
         grep -v '\\n"' | \
         grep -v "/\* Continued \*/" | \
    +    grep -v "LogPrint()" | \
         grep -v "LogPrintf()")
     if [[ ${UNTERMINATED_LOGS} != "" ]]; then
    -    echo "All calls to LogPrintf() should be terminated with \\n"
    +    echo "All calls to LogPrintf() and LogPrint() should be terminated with \\n"
         echo
         echo "${UNTERMINATED_LOGS}"
         exit 1
    
  6. laanwj commented at 1:11 PM on May 2, 2018: member

    @MarcoFalke thanks, will add that and fix the remaining cases.

  7. Add missing newlines to LogPrint debug logging
    The linter only checked `LogPrintf`, not `LogPrint`.
    Fix the remaining cases.
    ff2ad2d569
  8. devtools: Make linter check LogPrint calls 4b75dcf0ec
  9. laanwj renamed this:
    net: Add missing newlines to debug logging
    Add missing newlines to debug logging
    on May 2, 2018
  10. laanwj force-pushed on May 2, 2018
  11. MarcoFalke commented at 1:19 PM on May 2, 2018: member

    utACK 4b75dcf0ec7beecc9a4638305d1beed9477ba06e

  12. promag commented at 1:41 PM on May 2, 2018: member

    utACK 4b75dcf.

  13. laanwj merged this on May 2, 2018
  14. laanwj closed this on May 2, 2018

  15. laanwj referenced this in commit ef46c9904b on May 2, 2018
  16. UdjinM6 referenced this in commit 406006f652 on Jul 29, 2020
  17. UdjinM6 referenced this in commit 27b03bdbee on Jul 29, 2020
  18. PastaPastaPasta referenced this in commit 2af1c8d6e7 on Jul 29, 2020
  19. MarcoFalke locked this on Sep 8, 2021


jnewbery

Labels

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-04-13 15:15 UTC

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