[logging] log system time and mock time #10383

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:log_mocktime changing 3 files +11 −11
  1. jnewbery commented at 7:54 PM on May 10, 2017: member

    Currently, if mocktime is set, the logs will be timestamped with the mocktime instead of the system time. It's often useful to have the system time in the logs (for example, when running an integration test, it's useful to know what bitcoind was doing at system time so you can see how it's interacting with the test framework or other bitcoind nodes).

    This PR timestamps the log with the actual system time, and also prints out the mocktime if mocktime is being used. @sdaftuar

  2. [logging] log system time and mock time 761392db3a
  3. jonasschnelli added the label Docs and Output on May 10, 2017
  4. laanwj commented at 6:00 PM on May 11, 2017: member

    An alternative suggestion would be to log changes to the mock time, instead of prepending it to every line, which causes vary long lines.

  5. sdaftuar commented at 8:03 PM on May 11, 2017: member

    This looks reasonable to me, utACK. This will fix the issues that test/functional/combine_logs has with tests using mocktime, right? @laanwj I'd personally prefer to have the extra timestamp on each line when using mocktime -- one use case I have is for my simulation environment, where mocktime is set on every message (tx, block, etc) that is delivered to bitcoind. Adding an extra line for each change in mocktime would add substantial clutter, and also make reading/parsing the actual debug output more difficult (the mocktime is usually more interesting to me than the system time).

  6. laanwj commented at 8:09 PM on May 11, 2017: member

    OK as this is only used for testing (and only a subset of the tests, as that) I'm fine with adding it to every line.

  7. kallewoof approved
  8. kallewoof commented at 5:24 AM on May 16, 2017: member

    utACK 761392db3a721728863f773d337d516125ddb23c

  9. laanwj merged this on May 16, 2017
  10. laanwj closed this on May 16, 2017

  11. laanwj referenced this in commit d0c37ee789 on May 16, 2017
  12. PastaPastaPasta referenced this in commit 4c2124fad6 on Jun 10, 2019
  13. PastaPastaPasta referenced this in commit c92e80cb9d on Jun 11, 2019
  14. PastaPastaPasta referenced this in commit 7dc6669b65 on Jun 11, 2019
  15. PastaPastaPasta referenced this in commit 49ff7cdce6 on Jun 15, 2019
  16. PastaPastaPasta referenced this in commit 241a9dcf44 on Jun 19, 2019
  17. PastaPastaPasta referenced this in commit 54eb5524b3 on Jun 19, 2019
  18. PastaPastaPasta referenced this in commit 91161076c2 on Jun 19, 2019
  19. PastaPastaPasta referenced this in commit 5c5d44c1c8 on Jun 19, 2019
  20. PastaPastaPasta referenced this in commit 4268e04090 on Jun 19, 2019
  21. PastaPastaPasta referenced this in commit 1c14e8de14 on Jun 20, 2019
  22. PastaPastaPasta referenced this in commit f874216799 on Jun 22, 2019
  23. PastaPastaPasta referenced this in commit 5012fb1ee5 on Jun 22, 2019
  24. PastaPastaPasta referenced this in commit 796a72ba25 on Jun 22, 2019
  25. PastaPastaPasta referenced this in commit 7722989e5a on Jun 22, 2019
  26. PastaPastaPasta referenced this in commit 2e997d0661 on Jun 22, 2019
  27. PastaPastaPasta referenced this in commit 7918cae2f0 on Jun 24, 2019
  28. barrystyle referenced this in commit 8f23590227 on Jan 22, 2020
  29. random-zebra referenced this in commit 14060430d9 on May 5, 2021
  30. 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-22 18:15 UTC

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