Emit the log cut and version stamp just as soon as we know how and where to do so. In the current code, parameter interactions and some startup informational messages will be appended before the cut.
Move log cut and version stamp earlier in AppInit2 #6147
pull ajweiss wants to merge 1 commits into bitcoin:master from ajweiss:ajw_1505_logcut changing 1 files +3 −2-
ajweiss commented at 9:40 PM on May 15, 2015: contributor
-
34020e4dda
Move log cut and version stamp earlier in AppInit2
Emit the log cut and version stamp just as soon as we know how and where to do so.
-
ajweiss commented at 10:06 PM on May 15, 2015: contributor
@jgarzik 's observations come into focus now. The current code potentially opens the debug.log as soon as the chainparams are configured and parameter interaction warnings are printed. This happens before the debug log is shrunk and the datadir lock is acquired. This now just pushes the cut and version message into that grey area. Really what this needs is a rework to do the buffering along with an explicit opening of the debug.log during startup, rather than the current open on first use strategy.
Ok, sorry for the spam. I'll get the real rework going and PR it.
- ajweiss closed this on May 15, 2015
- MarcoFalke locked this on Sep 8, 2021
Contributors