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

Save bazel commands that will be run to a log file

Open JesseTatasciore opened this issue 3 years ago • 4 comments

  • Everytime the aspect-cli runs a bazel command we should save it to a log file (useful for debugging, learning, etc)
  • Everytime the aspect-cli run we should inform the user where they can find the log of bazel commands (should add a config option to disable this as well in case the user does not want this to happen)

JesseTatasciore avatar Jan 06 '22 19:01 JesseTatasciore

Use an off-the-shelf logger library. Name a directory with an aspect-generated invocation ID, then it contains /aspect.log, /plugin1.log, /crash.log, /command.log etc Maybe also another file which is an index of the invocations we ran. Prevent logs growing on disk forever.

Make it easy for us to log more things from more places. Thulio has ideas of what API to use to expose the logger, maybe it goes through the ctx

Plugins should each get their own log file.

alexeagle avatar Jan 27 '22 18:01 alexeagle

https://www.youtube.com/watch?v=QrGrOK8oZG8

alexeagle avatar Jan 27 '22 18:01 alexeagle

We can have log levels in the API, but let's just set the level to DEBUG always for now, with no user affordance to change it. Can revisit later. Generally we'd like more data available for us to diagnose issues rather than less.

alexeagle avatar Feb 17 '22 18:02 alexeagle

Maybe use https://pkg.go.dev/log/syslog if it meets our requirements? logstash? humio?

https://www.humio.com/log-management/ https://www.elastic.co/logstash/

alexeagle avatar Feb 17 '22 18:02 alexeagle