Save bazel commands that will be run to a log file
- 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)
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.
https://www.youtube.com/watch?v=QrGrOK8oZG8
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.
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/