lightningd: implement --log-timestamps=false.

Fixes: #4494
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: config: New option `log-timestamps` allow disabling of timestamp prefix in logs.
This commit is contained in:
Rusty Russell
2021-05-03 12:49:43 +09:30
committed by neil saitug
parent 96acafcef3
commit 9825f32874
4 changed files with 48 additions and 16 deletions

View File

@@ -2529,3 +2529,10 @@ def test_version_reexec(node_factory, bitcoind):
# Now "fix" it, it should restart.
os.unlink(verfile)
l1.daemon.wait_for_log("Server started with public key")
def test_notimestamp_logging(node_factory):
l1 = node_factory.get_node(options={'log-timestamps': False})
assert l1.daemon.logs[0].startswith("DEBUG")
assert l1.rpc.listconfigs()['log-timestamps'] is False