Skip to content

TUI for journalctl, file system logs, as well Docker and Podman containers for quick viewing and filtering with fuzzy find, regex support (like fzf and grep) and coloring the output, written in Go with the gocui library.

License

Notifications You must be signed in to change notification settings

Lifailon/lazyjournal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal user interface for journalctl (tool for reading logs from systemd), logs in the file system (including archival, for example, apache or nginx) and docker containers for quick viewing and filtering with fuzzy find and regex support (like fzf and grep), written in Go with the awesome-gocui (fork gocui) library.

This tool is inspired by and with love for lazydocker and lazygit.

interface

Filter

Supported 3 filtering modes:

  • [Default] - case sensitive exact search.
  • [Fuzzy] - imprecise case-insensitive search (searches for all phrases separated by a space anywhere in the string).
  • [Regex] - search with regular expression support, case insensitive by default (in case a regular expression syntax error occurs, the input field will be highlighted in red).

Roadmap

  • Sorting logs by modification date and support archived logs from /var/log directory.
  • Support fuzzy find and regular expression to filter output.
  • Backgound color of the found word when filtering.
  • Filter for log lists.
  • Background checking and updating the log when data changes.
  • Syntax coloring for logging output.
  • Scrolling interface.
  • Mouse support.
  • Add a switch to load other logs (for example, USER_UNIT) and other log paths in the file system.
  • Windows support via PowerShell (events and logs from program files).
  • Podman log support.
  • Support remote machines via ssh protocol.

Install

Binaries for the Linux operating system are available on the releases page.

Development is done on the Ubuntu system, also tested in WSL environment on Debian system (amd64 platform).

For a quick installation, download the executable from the GitHub repository to your home directory with other executables for the current user and grant execute permissions:

version="0.1.0"
arch="amd64" # or "arm64"
mkdir -p ~/.local/bin
curl -s https://github.com/Lifailon/lazyjournal/releases/download/$version/lazyjorunal-$version-linux-$arch -o ~/.local/bin/lazyjorunal
chmod +x ~/.local/bin/lazyjorunal

You can launch the interface anywhere:

lazyjorunal

Build

Go must be installed on the system, for example, for Ubuntu you can use the SnapCraft package manager:

snap install go --classic
go version

Clone the repository, install dependencies from go.mod and run the project:

git clone https://github.com/Lifailon/lazyjournal
cd lazyjournal/src
go mod tidy
go run main.go

Building the executable file:

GOOS=linux GOARCH=amd64 go build -o bin/
bin/lazyjournal

Hotkeys

  • Tab - Switch between windows.
  • Enter - Select a journal from the list to display logs.
  • Up/Down - Move up or down through all journal lists and log output.
  • Shift+<Up/Down> - Quickly move up or down (every 10 lines) through all journal lists and log output.
  • <Shift/Alt>+<Left/Right> - Changing the mode in the filtering window. Available: Default, Fuzzy and Regex.
  • Ctrl+C - Exit.

Alternatives

  • Dozzle - is a small lightweight application with a web based interface to monitor Docker logs. It doesn’t store any log files. It is for live monitoring of your container logs only.

If you like using TUI tools, try multranslate for translating text in multiple translators simultaneously, with support for translation history and automatic language detection.

About

TUI for journalctl, file system logs, as well Docker and Podman containers for quick viewing and filtering with fuzzy find, regex support (like fzf and grep) and coloring the output, written in Go with the gocui library.

Topics

Resources

License

Stars

Watchers

Forks