Skip to content

Improve logging by separating debug from information #144

@shyba

Description

@shyba

fDebug flag can be used for that like:

lbrycrd/src/main.cpp

Lines 5226 to 5227 in 01a222a

if (fDebug || (vInv.size() != 1))
LogPrint("net", "received getdata (%u invsz) peer=%d\n", vInv.size(), pfrom->id);

It's initialized according to -debug setting:

fDebug = !mapMultiArgs["-debug"].empty();

Ideally it should be applied to log messages that doesn't hold information for a sysadmin, but mainly for developers, like: https://github.com/lbryio/lbrycrd/blob/master/src/claimtrie.cpp#L1927

To be updated with more examples where it should be applied after #137 gets merged as it adds more cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: improvementExisting (or partially existing) functionality needs to be changed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions