Skip to content
yagofontanezPublic

About

A keyboard-driven log viewer for the terminal. Live tail, regex/inverse filters, level toggles, error jumping, bookmarks, and export. Built in Go with Bubble Tea.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

logview

A premium terminal log viewer for live-tailing, filtering, and exploring log files. Built in Go with Bubble Tea and Lip Gloss.

 ▌ logview │ test.log                                  18 lines · upd now
   ● INFO 421   ▲ WARN 87   ✖ ERROR 12   ⚠ FATAL 0   ● DEBUG 42
   ████████████████████████████████████████████████████████████████████████
    10:23:14  ●  INFO   Server started on port 3000
    10:23:15  ●  INFO   Connection accepted from 192.168.1.5
  ★ 10:23:16  ▲  WARN   High memory usage detected
  ▎ 10:23:17  ✖  ERROR  Timeout after 30s
    10:23:18  ●  INFO   Retrying connection...
   ─────────────────────────────────────────────────────────────────────
   /payment   3/421 · follow ON · ★ 1                              ? help

Features

  • Live tail — watches the file via fsnotify and auto-scrolls on append.
  • Stdin mode — pipe anything in with tail -f x.log | logview -.
  • Pause the display while the file keeps growing in the background.
  • Filter by substring or regex, with an inverse mode (!prefix) and a filter history (↑/↓).
  • Level toggles — hide/show INFO, WARN, ERROR, DEBUG independently.
  • Jump between errors — n / N cycles through ERROR and FATAL lines.
  • Bookmarks — mark any line and cycle through them with ] / [.
  • Detail view — open the full parsed line in a centered card.
  • Export the current filtered view to <file>.filtered.log.
  • Timestamp parsing — recognises HH:MM:SS[.fff] and ISO 8601 prefixes and dims them so the message stands out.
  • Premium UI — Catppuccin Mocha palette, proportional level bar, level chips, cursor highlight, rounded cards for detail/help.

Install

From source

Requires Go 1.21+ (developed against Go 1.26).

go install github.com/yagofontanez/logview@latest

Build locally

git clone https://github.com/yagofontanez/logview.git
cd logview
go build -o logview .
./logview test.log

Usage

logview <file>          # open and follow a file
logview -               # read from stdin (keyboard still works via /dev/tty)

# pipe examples
tail -f /var/log/syslog | logview -
journalctl -f           | logview -
kubectl logs -f my-pod  | logview -

When stdin closes, the header shows stdin · EOF and the buffer stays open for browsing.

Keyboard shortcuts

Navigation

Key Action
j k / ↑ ↓ move cursor one line
g / G go to top / bottom
PgUp / PgDn scroll one page
Enter open detail view for selected line
Esc close detail / clear active filter

Filtering

Key Action
/ open the filter prompt
Ctrl+R toggle substring ↔ regex (while editing the filter)
↑ / ↓ cycle filter history (while editing the filter)
Enter apply filter and exit prompt
Esc cancel filter prompt and clear the active filter
!prefix inverse filter (e.g. !INFO hides lines with INFO)

Levels

Key Action
i / w / e / D hide/show INFO / WARN / ERROR / DEBUG
n / N next / previous ERROR or FATAL line

Bookmarks

Key Action
m toggle bookmark on the cursor line
] / [ jump to next / previous bookmark

Display

Key Action
f toggle follow (tail) mode
p pause / resume display updates
L toggle line numbers

App

Key Action
x export current filtered view to .filtered.log
? toggle the help card
q / Ctrl+C quit

Log level detection

A line is classified by the first match of these substrings:

FATAL → ERROR → WARN → INFO → DEBUG (everything else is OTHER)

Timestamps are recognised when the line starts with either:

  • HH:MM:SS (optionally followed by .fff or ,fff)
  • YYYY-MM-DD[T ]HH:MM:SS[.fff][Z|±HH:MM] (ISO 8601)

The detected timestamp is rendered in a dim column so the rest of the line keeps its level colour.

Filter syntax

Filter Meaning
(empty) show all lines
payment case-insensitive substring match
!INFO inverse — hide lines that contain INFO
(regex mode) the filter is compiled as a case-insensitive Go regex
!^[ \t]*# combine inverse + regex (hide commented lines)

Toggle regex mode with Ctrl+R while the filter prompt is open. An invalid regex is reported in the status bar without crashing the view.

Project layout

.
├── main.go        # the entire program
├── go.mod
├── go.sum
├── test.log       # small sample input
└── README.md

License

MIT — see LICENSE if present, otherwise feel free to use under MIT terms.

About

A keyboard-driven log viewer for the terminal. Live tail, regex/inverse filters, level toggles, error jumping, bookmarks, and export. Built in Go with Bubble Tea.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages