ZmnSCPxj / clboss

Automated Core Lightning Node Manager
MIT License
213 stars 32 forks source link

lightning log file size #194

Open desperadoes-file opened 7 months ago

desperadoes-file commented 7 months ago

Just wondering is it normal when running the clboss plugin for the lightning.logs file to grow to a massive size with tens of thousands of:

lightningd: Calling rpc_command hook of plugin clboss plugin-clboss: Rpc in: listchannels {\"source\": \"XXX"} => {\"channels\":[{\"source\":\"XXX> plugin-clboss: Rpc out: listchannels {\"source\": \"XXX\"} lightningd: Plugin clboss returned from rpc_command hook call

Also of note, previously I had clboss running and it was unable to create channels with peers, but since upgrading to 0.13.1rc1 today, my node now has 1 channel pending. Thanks.

ksedgwic commented 7 months ago

@desperadoes-file yes, this is a known problem. CLBOSS would definitely benefit from a round of log "tuning" where we reclassify existing logging between ERROR, WARN, INFO, DEBUG, and TRACE to decrease the "noise". The example you gave is one that bothers me all the time as well.

My opinion: INFO - good "standard" logging level, log growth should not be huge DEBUG - needed for debugging and development - might be left on for a month so logs need to be moderately big TRACE - high level of debugging, everything can be logged, maybe can only run this way for a day or two due to space

It's tempting to mark this as a "good first issue" because it is so easy to fix, but maybe it requires insight into debugging CLBOSS to do well.

Here are some CLBOSS log matching expressions where I would make log sooner (ie at INFO instead of DEBUG):

        regex+="plugin-clboss: New block at|"
    regex+="plugin-clboss: NodeBalanceSwapper|"
    regex+="plugin-clboss: SwapManager:|"
    regex+="plugin-clboss: Boltz::Service|"
    regex+="plugin-clboss: OnchainFundsAnnouncer|"
    regex+="plugin-clboss: ChannelCreationDecider|"
    regex+="plugin-clboss: ChannelCreator|"
    regex+="plugin-clboss: Rpc out: sendrawtransaction|"
    regex+="plugin-clboss: ChannelCandidateInvestigator|"

Here are some CLBOSS log matching expressions for logging which should be at TRACE instead of DEBUG:

    vregex+='no more swaps need addresses|' # clboss
    vregex+='/swapstatus.*invoice\.expired|' # clboss
    vregex+='/swapstatus.*swap\.created|' # clboss
    vregex+='plugin-clboss.*ChannelCandidateInvestigator.*Investigating|'
    vregex+='plugin-clboss.*ChannelCandidateInvestigator.*is online|'
    vregex+='plugin-clboss.*ChannelCandidateInvestigator.*Janitor: Rejected|'
    vregex+='plugin-clboss.*Boltz::Service.*Swaps:|'

Others may have a different viewpoint, of course ...