kit icon indicating copy to clipboard operation
kit copied to clipboard

Easier to debug faults

Open alexec opened this issue 1 year ago • 9 comments

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:

  1. All logs, muxed to the terminal.
  2. 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?

alexec avatar Apr 01 '23 14:04 alexec

One idea would be to show all logs by default. Each line would be prefixed by the task name and the task status.

alexec avatar Sep 17 '23 16:09 alexec

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.

alexec avatar Sep 17 '23 21:09 alexec

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)

agilgur5 avatar Oct 02 '23 03:10 agilgur5

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

alexec avatar Oct 02 '23 20:10 alexec

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.

agilgur5 avatar Oct 02 '23 21:10 agilgur5

ok, which task?

alexec avatar Oct 03 '23 15:10 alexec

It would be for any task that has dependencies. Being able to see an individual log stream instead of all of them together.

agilgur5 avatar Oct 03 '23 17:10 agilgur5

Logs are always saved in logs/taskname.log. Could you tail that?

alexec avatar Oct 03 '23 23:10 alexec

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

agilgur5 avatar Oct 04 '23 00:10 agilgur5