Skip to content

Instantly share code, notes, and snippets.

View seanfrischmann's full-sized avatar

Sean Frischmann seanfrischmann

View GitHub Profile
@seanfrischmann
seanfrischmann / logs.sh
Created August 1, 2018 18:31
Tail your logs with color
#!/bin/bash
tail -F /path/to/logs/*.log | awk '
/INFO/ {print "\033[32m" $0 "\033[39m"}
/DEBUG/ {print "\033[34m" $0 "\033[39m"}
/ERROR/ {print "\033[31m" $0 "\033[39m"}
$0 !~ /INFO|ERROR|DEBUG/ {print $0}
'