flow-cli icon indicating copy to clipboard operation
flow-cli copied to clipboard

Progress loggers issues

Open devbugging opened this issue 2 years ago • 2 comments

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).

devbugging avatar May 04 '23 18:05 devbugging

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

devbugging avatar May 16 '23 15:05 devbugging

That makes sense to me.

bjartek avatar May 16 '23 19:05 bjartek