kit
kit copied to clipboard
Easier to debug faults
Apps tend to consist of:
- Downstream dependencies. E.g. Kafka. These don’t generally go faulty, because faults are caused by code changes.
- The app itself. This goes faulty a lot, because user changes the code and introduces faults.
When app goes faulty, we want to see the logs:
- All logs, muxed to the terminal.
- Just the app logs.
Currently we do (2). Should we do (1)?
What I actually do is have a second terminal open running tail -f
. This is poor UX.
Should we switch out of max mode automatically?
One idea would be to show all logs by default. Each line would be prefixed by the task name and the task status.
After about 2h of experimentation the issue is still challenging. When your app is working just fine, you just want to see the fact it is fine. Yet once it is faulty, you want to see information that made it faulty.
A general option to change in between the two modes -- muxed together and single log stream -- at any point during a task run would be helpful IMO. I prefer to look at one at a time, so the muxing actually confuses me, especially without prefixes or separate colors (like ktail
or kubetail
)
To start in demux mode:
CI=1 kit ...
In v0.1.8+, switch while running press:
- 0+Enter - normal (muxed mode)
- 1+Enter - show error logs
- 2+Enter - show warning+ logs
- 3+Enter - show info+ logs
- 4+Enter - show all logs
Maybe I'm using the wrong terminology with "mux", sorry about that (I don't use tmux
etc). I've seen the word "interleaved" used by some CLI tools which does describe what I meant, so maybe that's the right term.
As far as I understand, all the log level options still show logs from all concurrent tasks. Whereas seeing a single log stream from a single task is what I'm used to.
ok, which task?
It would be for any task that has dependencies. Being able to see an individual log stream instead of all of them together.
Logs are always saved in logs/taskname.log
. Could you tail that?
Yes, I could. That's a workaround though, it would be great if something like that were built-in and I could switch between the modes as needed. Perhaps by using Ctrl
+<some-key>
or Cmd
+<some-key>
(which is a bit more familiar than the 1
+Enter
currently used for log levels)
You mentioned that in your opening comment:
What I actually do is have a second terminal open running
tail -f
. This is poor UX.
That's why I brought it up in this issue specifically