Ben Woosley
0602fbe7ca
fix(lnd log level): Fix lndLogGetLevel to apply the most-recent log level when none is detected
In some cases, multi-line log output was output at its value for the first line,
but in the trace log in following lines. For example, in this output:
zap:lnd [DBG] 2018-06-17 18:30:35.051 [DBG] CRTR: New channel update applied: (*channeldb.ChannelEdgePolicy)(0xc420e74310)({ +0ms
zap:lnd [DBG] SigBytes: ([]uint8) (len=71 cap=71) { +0ms
zap:lnd [DBG] }, +0ms
zap:lnd [DBG] sig: (*btcec.Signature)(<nil>), +0ms
zap:lnd [DBG] ChannelID: (uint64) 1423834572626526208, +0ms
zap:lnd [DBG] LastUpdate: (time.Time) 2018-06-17 18:30:26 -0500 CDT, +0ms
zap:lnd [DBG] Flags: (lnwire.ChanUpdateFlag) 1, +0ms
zap:lnd [DBG] TimeLockDelta: (uint16) 6, +0ms
zap:lnd [DBG] MinHTLC: (lnwire.MilliSatoshi) 1000 mSAT, +0ms
zap:lnd [DBG] FeeBaseMSat: (lnwire.MilliSatoshi) 1 mSAT, +0ms
zap:lnd [DBG] FeeProportionalMillionths: (lnwire.MilliSatoshi) 10 mSAT, +0ms
zap:lnd [DBG] Node: (*channeldb.LightningNode)(<nil>), +0ms
zap:lnd [DBG] db: (*channeldb.DB)(<nil>) +1ms
zap:lnd [DBG] }) +0ms
zap:lnd [DBG] +0ms
Previously the first line would be marked DBG, while the others were marked TRC.
7 years ago