(WIP) Add -logtimemillis command line option #9062

pull rebroad wants to merge 2 commits into bitcoin:master from rebroad:LogTimeMillisOption changing 3 files +8 −7
  1. rebroad commented at 12:56 PM on November 2, 2016: contributor

    I find micros are too granular, with no line ever being less than 1 millisecond apart from its neighbouring lines, therefore this option will save 3 bytes per line of debug.log :)

  2. laanwj commented at 1:05 PM on November 2, 2016: member

    Seems overkill to have three time formats

  3. laanwj added the label Docs and Output on Nov 2, 2016
  4. jonasschnelli commented at 1:05 PM on November 2, 2016: contributor

    Agree with @laanwj

  5. rebroad commented at 1:45 PM on November 2, 2016: contributor

    @laanwj you have a point - shall I add to this the removal of logtimemicros? I just didn't want to inconvenience people who already had it in their bitcoin.conf, though. Or make it so that logtimemicros shows only the first three decimal places?

  6. rebroad renamed this:
    Add -logtimemillis command line option
    (WIP) Add -logtimemillis command line option
    on Nov 2, 2016
  7. Add -logtimemillis command line option
    I find micros are too granular, with no line ever being more than 1
    millisecond apart from its neighbouring lines, therefore this option
    will save 3 bytes per line of debug.log :)
    e2d71ccbce
  8. rebroad force-pushed on Nov 2, 2016
  9. fixup (to address nits) 9c34d3338e
  10. laanwj commented at 2:09 PM on November 2, 2016: member

    IMO we should just keep things as is. Either use microsecond precision, or second precision, or keep this as a custom patch. You could even postprocess the log to chop off three positions. For the rest of the world this just isn't so important.

  11. laanwj closed this on Nov 2, 2016

  12. laanwj commented at 2:21 PM on November 2, 2016: member

    I'd fathom the rest of the world, too, has more urgent things to discuss too than even more flavors of logging format. This shouldn't compete for attention with bugfixes and new features.

  13. rebroad commented at 2:23 PM on November 2, 2016: contributor

    @laanwj You are probably right, however, many other projects default to logging only milliseconds. I do still question the logic in logging 3 additional insignificant decimal places, given that lines (in my experience) are never less than 1ms apart.

    I like the idea of postprocessing, although ideally rather than post-processing this could be done by piping so that the unprocessed debug log isn't created. Is there currently an option to debug to stdout or stderr?, as this would then be possible.

  14. laanwj commented at 2:26 PM on November 2, 2016: member
    src/init.cpp:    strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
    
  15. MarcoFalke locked this on Sep 8, 2021
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-22 18:15 UTC

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