logh

package module
v0.0.0-...-cd2e34b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 5 Imported by: 0

README

Log Highlighter Build Status codecov

This tool colorizes the output based on regular expressions, making it easier to follow logs at a glance. logh

Requirements

  • go 1.16

Installing

git clone https://github.com/haroflow/logh
cd logh
go build cli/logh.go
# Copy logh to a folder in your PATH

Using

Pass data to logh via stdin. Pass regular expressions as arguments to highlight the text. Each argument will get a different color (up to 10 at the moment).

Examples:

# View help
logh

# Highlights "GET" with red, "POST" with green
tail -f /var/log/httpd/access.log | logh GET POST

# Highlights the whole line containing "word"
cat textfile.txt | logh '.*word.*'

# Ignore case. Matches get, GET, Get, etc.
cat textfile.txt | logh -i get

Documentation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL