Skip to content

Instantly share code, notes, and snippets.

@muvaf
Last active November 16, 2023 17:05
Show Gist options
  • Save muvaf/29dd0dc0e3d5a907cdeb7b699e807479 to your computer and use it in GitHub Desktop.
Save muvaf/29dd0dc0e3d5a907cdeb7b699e807479 to your computer and use it in GitHub Desktop.
How to browse log lines from multiple apps in single terminal

Browsing log lines in single terminal

You have a pipeline that builds multiple apps in parallel and the logs of every build drops into the same terminal window or you run multiple apps with a single command and one app has too many log lines that it clutters the terminal window.

Install lnav command. It's website is here.

brew install lnav

Run the command and pipe its output:

my-command | lnav

Type :filter-out and enter your regexp to remove the logs of the specific app you're not interested in.

:filter-out graphql-server

Type :filter-in and enter a regexp that matches only the log lines you are interested in.

:filter-in main-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment