HomePhabricator

[logging] log system time and mock time

Description

[logging] log system time and mock time

Summary:

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.

Backport of core PR10383

Depends on D2422

Test Plan:

./test/functional/test_runner.py --nocleanup rpc_uptime

Check in the debug.log that both system time and mock time are logged

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2423

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on May 10 2017, 19:49
FabienCommitted on Jan 28 2019, 19:46
FabienPushed on Jan 28 2019, 19:46
Reviewer
Restricted Project
Differential Revision
D2423: [logging] log system time and mock time
Parents
rABCa54598f1e5b4: Fix several potential issues found by sanitizers
Branches
Unknown
Tags
Unknown

Event Timeline