no more double timestamps in debug.log #1262

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:no_double_timestamps changing 5 files +3 −12
  1. Diapolo commented at 10:18 PM on May 11, 2012: none
    • ensure that no double timestamps show up in the debug.log, by removing manual timestamps from the source (now only -logtimestamps parameter adds timestamps to debug.log)
  2. gmaxwell commented at 10:26 PM on May 11, 2012: contributor

    I'm kind of inclined to say that we should just remove all the timestamps in messages. It would be a lot cleaner then the conditional printfs in the patch. If timestamps are off we could occasionally write markers in the log (E.g. once an hour, and at startup and shutdown).

    (I would just say we should enable timestamps always— but I wouldn't want to make it more attractive for people to compromise bitcoin nodes in order to track the propagation of transactions)

  3. Diapolo commented at 10:36 PM on May 11, 2012: none

    If I had a wish, I would remove all additional timestamps from the source and only rely on the -logtimestamps switch, as this is way cleaner. Perhaps we can force -logtimestamps, if one enables -debug!?

  4. sipa commented at 11:08 PM on May 11, 2012: member

    I don't see how moving the conditional time output out of printf makes any difference?

    Edit: my mistake, I misread the source changes. I assumed the double timestamps were caused by two threads trying to write to debug at once.

  5. Diapolo commented at 8:43 AM on May 12, 2012: none

    sipa: I have the impression if you use -logtimestamps and add a timestamp manually like in the places I changed in the code you get something like: "05/11/12 18:10:37 05/11/12 18:10:37 sending: getdata (37 bytes)"

    And that was what I'm trying to fix ;).

  6. Diapolo commented at 10:01 PM on May 12, 2012: none

    So, remove the manual timestamps? @gmaxwell Is -timestamps default to on really a security issue?

  7. gmaxwell commented at 11:56 PM on May 12, 2012: contributor

    Since no one is protesting I think you should just go remove the manual timestamps.

    As far as security goes,— we log too much that would be valuable to someone collecting logs already. Timestamps by default would make it worse. I've seldom wished there were there in logs other people have given me in any case.

  8. Diapolo commented at 9:57 AM on May 13, 2012: none

    Rebased and updated to remove manual timestamps!

  9. ensure that no double timestamps show up in the debug.log, by removing manual timestamps from the source (now only -logtimestamps parameter adds timestamps to debug.log) 0985816bf6
  10. gmaxwell referenced this in commit 20f19893cb on May 15, 2012
  11. gmaxwell merged this on May 15, 2012
  12. gmaxwell closed this on May 15, 2012

  13. gmaxwell commented at 1:59 AM on May 15, 2012: contributor

    since no one protested…

  14. coblee referenced this in commit 408d650afe on Jul 17, 2012
  15. lateminer referenced this in commit b5e7a63169 on Jan 22, 2019
  16. lateminer referenced this in commit da7c50eca1 on May 6, 2020
  17. 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-21 18:16 UTC

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