Add a "verbosity" degree-of-freedom to debug level structured logging output. In pursuit of maintainability, this SHOULD generalize such that it can support all CLI binaries (e.g. node, client, etc.).
Conceptually, debug log verbosity has a consumer side and producer side:
Consumer
As an end-user, I only want to see log out put which is either actionable or necessary to support/enable continued operation so that I don't waste time considering output that does not require action. Typically this excludes the debug level altogether but in some circumstances, I need to see additional, debug level, logs (e.g. troubleshooting). In these scenarios, I prefer to see the "minimal useful" (i.e. lowest degree of verbosity) debug level output, by default.
As a contributor, while debugging, I want to be able to exclude excessively "noisy", debug-level, log output so that I can more easily locate more relevant debug log lines and ignore irrelevant ones. I would prefer the lowest degree of verbosity by default but sometimes, I need to be able to consider higher degrees (e.g. validating assumptions, debugging edge-cases). I would also find it quite convenient to be able to specify the verbosity of a particular module independently of others.
# P2P module only
p1 -v p2p
p1 -vv p2p
...
# P2P and Consensus modules only
p1 -v p2p,consensus
p1 -vv p2p,consensus
...
Producer
As a contributor, while writing code, I want to be able to include debug-level log output around mission critical and/or show-stoppingly significant parts of the code (e.g. maxing out OS resource limits). However, I don't want to have to be too concerned about the "noisiness" of the log output such that it requires real consideration in the debug logging code (i.e. debug logging should not need to be that complex).
Objective
Add a "verbosity" degree-of-freedom to debug level structured logging output. In pursuit of maintainability, this SHOULD generalize such that it can support all CLI binaries (e.g. node, client, etc.).
Conceptually, debug log verbosity has a consumer side and producer side:
Consumer
As an end-user, I only want to see log out put which is either actionable or necessary to support/enable continued operation so that I don't waste time considering output that does not require action. Typically this excludes the debug level altogether but in some circumstances, I need to see additional, debug level, logs (e.g. troubleshooting). In these scenarios, I prefer to see the "minimal useful" (i.e. lowest degree of verbosity) debug level output, by default.
As a contributor, while debugging, I want to be able to exclude excessively "noisy", debug-level, log output so that I can more easily locate more relevant debug log lines and ignore irrelevant ones. I would prefer the lowest degree of verbosity by default but sometimes, I need to be able to consider higher degrees (e.g. validating assumptions, debugging edge-cases). I would also find it quite convenient to be able to specify the verbosity of a particular module independently of others.
Examples (illustrative only):
Per-module verbosity:
Producer
As a contributor, while writing code, I want to be able to include debug-level log output around mission critical and/or show-stoppingly significant parts of the code (e.g. maxing out OS resource limits). However, I don't want to have to be too concerned about the "noisiness" of the log output such that it requires real consideration in the debug logging code (i.e. debug logging should not need to be that complex).
Example (illustrative only):
Origin Document
Goals
Consumer
-v
,-vv
, etc.) while maintaining separation of concerns between library and CLI binary code.Producer
Related Code
... app/pocket/main.go ... need to add cobra integration, be consistent with [good example ?]
... LoggerModule ...
Open Questions
... how to signal to localnet? ... makefile? :roll_eyes:
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
make ...
make ...
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdk8s LocalNet
is still functioning correctly by following the instructions hereCreator: @bryanchriswhite Co-creator(s): @h5law