2

I have a single logfile that contains logs for a threaded application. Each thread writes its own name onto the lines they emit:

16.04.2021 10:10:04 - Thread-1 - DEBUG - I did something
16.04.2021 10:10:04 - Thread-2 - DEBUG - I too did something
16.04.2021 10:10:04 - Thread-3 - DEBUG - I failed :/

I'd like to follow/tail this logfile but each window/terminal should view only one thread so that I can more easily see what each thread is currently doing. I am using window/terminal loosely here: If I have 5 threads it should create 5 "windows" in the same terminal, each window showing one thread.

I have found many solutions (like multitail) that tail multiple logfiles but so far I have been unsuccessful in finding one that does what I described.

kiesel
  • 21
  • You could use tmux or screen to create 5 panes, and run a different command in each of them – Panki Apr 16 '21 at 09:31
  • It'd be nice if there was a single-command solution so that I don't have to open and arrange tmux windows every time I need this. – kiesel Apr 16 '21 at 09:42
  • 2
    Use tmux -f to specify an alternate config file, and set up your panes and commands in there – Panki Apr 16 '21 at 09:57

0 Answers0