Open sideninja opened 1 year ago
We could refactor so the flowkit accepts a logger type that only contains the simple log functions. We could create simple wrappers for popular loggers mentioned above. If there's a need for progress logging we could at that point check whether the passed logger implements the progress functions by comparing to ProgressLogger
interface and if it does use it otherwise ignore showing progress.
cc @bjartek
That makes sense to me.
Progress reporting should be avoided where possible (in some cases it provides value to CLI users seeing the progress).
There's a possible bug not stopping the progress https://github.com/onflow/flow-cli/blob/93b7336efceb00bf20b3039ca3694cec492ebff9/flowkit/flowkit.go#L310 All the progress reports should be revisited and make sure they can run nicely with multiple go routines.
The logger should support integration with popular go logging libraries (logrus, zap, zerolog).