No reason not to have timestamps on the console, especially as the documentation is unclear about this.
Changed logging to make -logtimestamps to work also for -printtoconsole #6742
pull arnuschky wants to merge 1 commits into bitcoin:master from arnuschky:feature-logtimestamps-toconsole changing 1 files +4 −3-
arnuschky commented at 3:59 PM on September 30, 2015: contributor
-
Changed logging to make -logtimestamps to work also for -printtoconsole 58981d4f7d
-
laanwj commented at 4:13 PM on September 30, 2015: member
Concept ACK
But I think your current implementation has a problem: if a LogPrintf continues on the same line, this will probably add a new timestamp for every print.
- laanwj added the label Docs and Output on Sep 30, 2015
-
jgarzik commented at 9:38 AM on October 1, 2015: contributor
concept ACK - agree w/ problem
-
arnuschky commented at 11:38 AM on October 1, 2015: contributor
Either I am missing your point or you are mistaken. The change I made only caused timestamps to be printed on the console the same way as it is written to the logs.
The current behavior is as follows. Code:
LogPrintf("multi"); LogPrintf("call\n"); LogPrintf("single call\n"); LogPrintf("multi\nline\n");Output:
2015-10-01 11:35:38 multicall 2015-10-01 11:35:38 single call 2015-10-01 11:35:38 multi lineI can't say whether this was the intention of the original author. If a different behavior is desired, I can change it of course.
-
laanwj commented at 11:57 AM on October 1, 2015: member
Looks good, then I was mistaken.
-
laanwj commented at 7:59 AM on October 6, 2015: member
Tested ack.
- laanwj merged this on Oct 6, 2015
- laanwj closed this on Oct 6, 2015
- laanwj referenced this in commit 3b2d37c619 on Oct 6, 2015
- MarcoFalke locked this on Sep 8, 2021