pepr icon indicating copy to clipboard operation
pepr copied to clipboard

npx pepr logs

Open cmwylie19 opened this issue 3 months ago • 1 comments

Is your feature request related to a problem? Please describe.

I'd like to be able to use a Pepr CLI command to pull easy-to-read Pepr Controller logs from a cluster.

Describe the solution you'd like

One of the primary methods of troubleshooting Pepr Modules is to "check the logs" when something unexpected happens. The current method for doing so is to dump pod logs via kubectl and, while that works, the experience isn't awesome:

  • pods use dynamic, generated names (which requires a query to lookup),
  • there are multiple pods to pull logs from (requiring multiple queries),
  • there are multiple ways to pull logs and not all of them return all logs.

An awesome experience would instead:

  • be easy to use (like running a single command),
  • get all interesting logs (from all pods),
  • and present logs in an easy to read way.

Therefore:

  • Given a Pepr Module running in a cluster

  • When I run the npx pepr logs --help

  • Then I see a nicely formatted set of options for querying for Pepr logs (per-pod, unified, colored, etc.)

  • And I run the npx pepr logs

  • Then I get a nicely readable, unified, time-ordered set of logs

Describe alternatives you've considered

  • leave things as they are and coach people through known-gotchas K8s query gotchas (like having to ask for ALL logs) -- ick, or
  • publish a "how to" in the Pepr docs about how to "correctly" get logs from Pepr -- also ick.

cmwylie19 avatar Mar 15 '24 19:03 cmwylie19