-1

I have a java application that runs multiple threads where most of them produce unique output that can't and shouldn't be mixed with the output of other's. In a nutshell I'm wondering if there is anything available that allows me to "switch" inbetween the output of the different threads. For example "Press x to navigate to the output of the next thread"

The linux screen command is basically what comes close to this. Needs to work in commandline so no swing available.

Any input is highly appreciated. If not it would end up in a custom build....

  • If it's only about viewing logs then the (currently only) [answer](https://stackoverflow.com/a/44486766/6730571) would be your best option. If the actual need is more involved than that, and you wand to build a text-based GUI, check out [Lanterna](https://github.com/mabe02/lanterna) or [other suggestions discussed here](https://stackoverflow.com/q/439799/6730571). – Hugues M. Jun 11 '17 at 17:52
  • Lanterna or the other suggestions you liked comes close to what I was looking for. would vote this one as correct answer. – user7890667 Jun 11 '17 at 23:06
  • Alright, posted as answer – Hugues M. Jun 11 '17 at 23:10

2 Answers2

0

Write the output to separate log files. Now you can tail -f whichever log file you want to view. You can even open multiple command windows and tail multiple logs in parallel.

Andreas
  • 154,647
  • 11
  • 152
  • 247
0

If it's only about viewing logs then Andreas's answer would be your best option.

If the actual need is more involved than that, and you wand to build a text-based GUI, check out Lanterna or other suggestions discussed here.

Hugues M.
  • 19,846
  • 6
  • 37
  • 65