Skip to content

haroflow/logh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log Highlighter

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

About

Log highlighter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages