feat(logging): default to info-level logging #207
feat(logging): default to info-level logging #207EddieHouston wants to merge 1 commit 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. |
be6a6d8 to
064b113
Compare
|
Looks great 👍
Agreed that these make sense to demote too. Maybe squash the two commits and remove the "This replaces the previous approach" part? And also rename the PR. |
Electrs has been observed starting, running for a few minutes, then dying silently in environments with no verbosity flags set. With the previous default (error-only), there was zero diagnostic output. Base verbosity is now info (error+warn+info) without any flags. Each -v flag adds one level: -v=debug, -vv=trace. Adds explicit info! milestone logs at each startup phase in src/bin/electrs.rs: daemon connection, DB open, initial sync start/complete, mempool load, startup complete. Promotes messages in schema.rs (block/header counts, tip) and db.rs (opening DB) to info so they fire on startup. Demotes noisy messages to debug: per-request HTTP logging, peer connect/disconnect, header download progress, and the discovery server-list dump. Drops the now-unnecessary -vvvv flag from README, doc/usage.md, and contrib/electrs.service.
064b113 to
7517756
Compare
Summary
-vflag (error-only logging), making it impossible to diagnose wherethey got stuck.
infoby default.-vselectsdebug,-vvselects
trace.info!milestone logs at each startup phase: daemon connection,DB open, initial sync start/complete, mempool load, startup complete.
debug!logs inschema.rsanddb.rstoinfo!soblock/header counts and DB open are visible at the default level.
debug!so the defaultoutput stays readable once startup completes.
doc/usage.md, andcontrib/electrs.serviceto dropthe now-unnecessary
-vvvvflag.Test plan
-vflag — startup milestones are logged andoutput stays quiet during steady-state operation.
-v/-vv— per-request and peer logs returnas expected.
was in.