Skip to content

LogLens ​

LogLens follows several log files at once and shows their new lines in one merged view in your terminal. Each file gets its own coloured label, error lines stand out in red, and a few single-key commands let you filter, search, pause and group similar errors while the logs keep growing.

What it does ​

  • Merges a live tail of many files. Every file you name becomes a source with its own colour badge, so you can tell app.log from api.log at a glance. (A tail is a view that follows the end of a file and shows new lines as they are written.)
  • Detects the log format of each file: JSON lines, syslog, nginx access and error logs, or a generic fallback. There are no flags to set.
  • Highlights levels (DEBUG, INFO, WARN, ERROR) as lines arrive.
  • Filters as you type with a regular expression (/), and can show errors only (e) while keeping each traceback attached to its error line.
  • Pauses the view (p) so you can scroll without new lines pushing it around, and searches the whole buffer (s) with n and N to move between matches.
  • Charts errors per minute (t) for the last 15 minutes.
  • Groups similar errors (c) into a ranked list with a count for each group, and jumps to the newest one.
  • Exports what you are looking at (w) to a new file, and never overwrites an existing one.
  • Survives log rotation. When a file is truncated, or renamed and recreated the way logrotate does it, LogLens picks the tail back up.

LogLens keeps the newest 100,000 lines of a session in memory. Older lines are dropped first.

Who it is for ​

  • Developers watching an app and its API logs side by side while they test.
  • Testers and support engineers who need to spot the first error in a burst of log output.
  • Anyone who has more than one tail -f open and wants them in one window.

What it does not do ​

LogLens reads files that already exist on your machine. It does not collect logs from remote servers, read from a pipe or standard input, or store anything between sessions. It is a viewer: it never changes the log files it reads.

Platforms ​

LogLens is a Python program for Linux and macOS terminals. It needs Python 3.10 or newer. It runs on x86-64 and ARM64 (aarch64) machines. Windows is not tested.

The current release is version 0.2.0. See Install.

Next steps ​