Skip to content

CLI tool for real-time log monitoring with regex highlighting, RTL fix, and interactive TUI — built in C.

License

Notifications You must be signed in to change notification settings

hesameworks/tailpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 tail++ (CLI Log Highlighter & Viewer)

tail++ is a modern, C-based alternative to tail -f — built for developers, DevOps, and companies that need fast, reliable, and readable log analysis.
It combines regex-based highlighting, RTL (right-to-left) fixes for Persian/Arabic filenames, and a minimal terminal UI for interactive navigation.


✨ Features

  • 🔎 Regex Filtering: Highlight ERROR/WARN or any custom regex.
  • 🎨 Colorized Output: ANSI highlighting for better readability.
  • 🌐 RTL Fix: Proper handling of Persian/Arabic file names & log text.
  • 📊 Terminal UI (ncurses):
    • Scroll with j/k, PgUp/PgDn
    • Jump to top/bottom with g/G
    • Pause/resume follow with f
    • Quick exit with q
    • Built-in help with h
  • 📂 Follow Mode: Track files as they grow (tail -f behavior).
  • Lightweight & Fast: Written in pure C, depends only on pcre2 and ncurses.

🛠 Installation

Requirements

  • GCC / Clang
  • libpcre2-dev
  • libncursesw5-dev

Build

git clone https://github.com/hesamworks/tailpp.git
cd tailpp
make

🚀 Usage

Basic

./tailpp --file sample_logs/app.log --regex "(ERROR|WARN)"

With Follow

./tailpp --file /var/log/syslog --regex "timeout|denied" --follow

With RTL Fix

./tailpp --file sample_logs/app.log --rtl-mode marks

With UI

./tailpp --file sample_logs/app-big.log --regex "(ERROR|WARN)" --rtl-mode marks --ui

📂 Sample Logs

-- sample_logs/app.log → Small test file -- scripts/gen_big_log.sh → Generate millions of lines for benchmarking -- scripts/live_append.sh → Simulate a real-time growing log file

Example:

./scripts/gen_big_log.sh sample_logs/app-big.log 3000000
./tailpp --file sample_logs/app-big.log --regex "(ERROR|WARN)" --ui

⚠️ Known Issues

-- VS Code’s built-in terminal may show bidi control characters (‏, ‫) when using RTL fix. -- Solution: Use an external terminal (gnome-terminal, kitty, etc.) for clean output.

🧩 Roadmap

  • Add JSON log parsing mode

  • Export filtered logs to file

  • Support themes (light/dark/solarized)

  • Plugin system for custom highlight rules

👨‍💻 Author

Developed with ❤️ by Hesam Focused on building practical developer tools, blockchain systems, and low-level C utilities.

📜 License

MIT License – free to use, modify, and share.

About

CLI tool for real-time log monitoring with regex highlighting, RTL fix, and interactive TUI — built in C.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published