feat(logging): always-on startup logging #207
feat(logging): always-on startup logging #207EddieHouston wants to merge 2 commits intoBlockstream:new-indexfrom
Conversation
98d05f0 to
b0ff950
Compare
b0ff950 to
b4ddcf2
Compare
b4ddcf2 to
efe5c7a
Compare
|
let's wait until we see before we revert verbosity. it's only at this point that electrs is ready
this is what it should show:
|
|
I would consider a different approach: make level 2 logging ( I don't think it's really ever desirable to hide Changing the meaning of |
Good simplification. This does remove the need to override log levels. I can see demoting the mempool message changed in this PR back to debug. I could also see some other info logs we can demote to debug as well:
If we later find that there is a need to implement the -q/--quiet option (depending on memory growth with 2 as the default)... we can then look at if an override on startup is necessary when that is set. |
…igured verbosity after Electrs has been observed starting, running for a few minutes, then dying silently in environments with no verbosity flags set. With the default verbosity (error-only), there is zero diagnostic output during startup. Initialize stderrlog at info level minimum during startup so key lifecycle milestones are always visible (daemon connection, DB open, sync progress, mempool load, server ready). After startup completes, log level drops to the user's configured verbosity via log::set_max_level(). Also promotes a handful of debug!() calls in schema.rs and mempool.rs to info!() so they fire during the startup window.
cf56222 to
be6a6d8
Compare
…ages to debug Base verbosity is now info (error+warn+info) without any flags. Each -v flag adds one level: -v=debug, -vv=trace. This replaces the previous approach of temporarily overriding the log level during startup and reverting after. Info-level messages are now always visible by default, eliminating the set/revert mechanism. Noisy messages demoted to debug: per-request HTTP logging, peer connect/disconnect, mempool stats, header download progress, and discovery server list dumps. Promoted 'opening DB' to info for startup visibility.
be6a6d8 to
064b113
Compare
Summary
running with no
-vflag (error-only logging), making it impossible todiagnose where they got stuck
drops to the user's configured verbosity after servers are listening
info!milestone logs at each startup phase: daemon connection,DB open, initial sync start/complete, mempool load, startup complete
debug!logs inschema.rsandmempool.rstoinfo!so block/header/mempool counts are visible during the startup window
Test plan
-vflag — verify startup milestones arelogged and logging goes silent after "startup complete"
-vvv— verify behavior is unchanged (alreadyabove the info threshold)
which phase it was in