Created
January 30, 2014 11:33
-
-
Save gerjantd/8706765 to your computer and use it in GitHub Desktop.
Tail remote log, save new lines locally and prettify json embedded in log lines using swatch and python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh user@host tail -F /usr/share/tomcat/logs/catalina.out >> /tmp/host-catalina.out | |
vi ~/.swatchrc: | |
watchfor /"from"/ | |
pipe 'cut -f5- -d" "|python -mjson.tool' | |
swatch -c ~/.swatchrc -t /tmp/host-catalina.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment