Improve debug logging #90

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:logging changing 1 files +10 −2
  1. jgarzik commented at 1:57 AM on March 3, 2011: contributor
    1. Timestamp each line in debug log, for easier problem tracking.
    2. Close and re-open debug log every 2000 lines, to enable log rotation software to replace the log while bitcoin continues uninterrupted operation.
  2. logging improvements: timestamps and close/re-open
    * Timestamp each log line.  This greatly assists in problem tracking.
    
    * Close the debug log every 2,000 lines (and re-open on 2001st line).
      This enable log rotation software to easily replace the debug log
      while bitcoin continues uninterrupted operation.
    5924491c3f
  3. gavinandresen commented at 2:42 AM on March 3, 2011: contributor

    Danger! Danger!

    The close and re-open will cause core dump because it's not thread-safe. I went down that rabbit-hole, and it's not pretty (don't be tempted to just wrap the printf in a CRITICAL_SECTION, because that causes issues during shutdown).

    I like the timestamping, though.

  4. jgarzik commented at 4:23 AM on March 3, 2011: contributor

    timestamping moved to #91

  5. glv2 referenced this in commit 5d762236b2 on Apr 15, 2014
  6. glv2 referenced this in commit 33963bdc77 on Jul 22, 2014
  7. dexX7 referenced this in commit 124168b7bd on Jun 26, 2015
  8. MarcoFalke referenced this in commit a4c7b76790 on Mar 26, 2016
  9. destenson referenced this in commit 070ca1f030 on Jun 26, 2016
  10. core-bitcoin referenced this in commit 5e19bce18d on Aug 10, 2017
  11. lateminer referenced this in commit 74db0262fb on Feb 23, 2019
  12. attilaaf referenced this in commit 9e65c99d70 on Sep 20, 2019
  13. rajarshimaitra referenced this in commit 35f866ef37 on Aug 5, 2021
  14. DrahtBot locked this on Sep 8, 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-04-13 21:16 UTC

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