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 :)
(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-
rebroad commented at 12:56 PM on November 2, 2016: contributor
-
laanwj commented at 1:05 PM on November 2, 2016: member
Seems overkill to have three time formats
- laanwj added the label Docs and Output on Nov 2, 2016
-
jonasschnelli commented at 1:05 PM on November 2, 2016: contributor
Agree with @laanwj
-
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?
- rebroad renamed this:
Add -logtimemillis command line option
(WIP) Add -logtimemillis command line option
on Nov 2, 2016 -
e2d71ccbce
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 :)
- rebroad force-pushed on Nov 2, 2016
-
fixup (to address nits) 9c34d3338e
-
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.
- laanwj closed this on Nov 2, 2016
-
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.
-
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.
-
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")); - MarcoFalke locked this on Sep 8, 2021