-
Notifications
You must be signed in to change notification settings - Fork 94
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersp2LowLow
Description
Currently we use a singleton logger, and our own interface around it. We have a number of issues with this approach, including the fact that our interface does not cover all the necessary functionality of the logging libraries underneath it.
Based on internal discussion, we have identified uber-go/zap as the best fit. We should remove our internal logging interface and replace all usages with direct calls to zap. We have some specific requirements around the logging as well:
- We need the ability to support structured logging (for the server and k8s deployment cases) and human-readable logging for the CLI. Zap provides support for both (see the sugared logger for the pretty printed output). We should have the ability to switch between them as needed without any of the application code needing to know about the differences.
- Instead of using a global singleton logger, we should instantiate a logger per component or per function (whichever is cleaner).
- We should have a clean way of specifying the log level to be used in the application. Preferably, if the
--debug
global flag is passed to the CLI, we should raise the log level to debug.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersp2LowLow