Search code examples
linuxfiltertail

diplaying output of mutliple logs in the same terminal instance


I am trying to find flow of a request in my application.I have multiple components that are responsible for handling that request.

For instance I have 4 components and I want to display all the logs in the same terminal instance to check the flow of the request. How can I achieve that?

Currently I am displaying all logs in different terminal instances like this.

tail -f path-to-log/component1.log
tail -f path-to-log/component2.log

I hope my question is understandable.


Solution

  • Just use:

    tail -f component1.log component2.log