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
  1. arnuschky commented at 3:59 PM on September 30, 2015: contributor

    No reason not to have timestamps on the console, especially as the documentation is unclear about this.

  2. Changed logging to make -logtimestamps to work also for -printtoconsole 58981d4f7d
  3. 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.

  4. laanwj added the label Docs and Output on Sep 30, 2015
  5. jgarzik commented at 9:38 AM on October 1, 2015: contributor

    concept ACK - agree w/ problem

  6. 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
    line
    

    I can't say whether this was the intention of the original author. If a different behavior is desired, I can change it of course.

  7. laanwj commented at 11:57 AM on October 1, 2015: member

    Looks good, then I was mistaken.

  8. laanwj commented at 7:59 AM on October 6, 2015: member

    Tested ack.

  9. laanwj merged this on Oct 6, 2015
  10. laanwj closed this on Oct 6, 2015

  11. laanwj referenced this in commit 3b2d37c619 on Oct 6, 2015
  12. 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