Skip to content

Instantly share code, notes, and snippets.

@dfparker2002
Created November 26, 2016 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfparker2002/db8bb08945872ded879e0bc4cf3b2302 to your computer and use it in GitHub Desktop.
Save dfparker2002/db8bb08945872ded879e0bc4cf3b2302 to your computer and use it in GitHub Desktop.
/*
src desc: http://labs.6dglobal.com/blog/2016-08-15/sightly-js-logging-how-to/
src: ttps://github.com/SixDimensions/AEM-Tools/tree/master/sightly-log-filter
Use console.log()
run this script from CLI; standalone in the logs directory by performing a chmod +x on the file, then running the file as so:
./sightlyLogFilter.sh myUseClass.js
Optionally you could alias this and just call the command.
*/
#!/bin/bash
if [ -z "$1" ]; then
echo "No Sightly JS Class name supplied...exiting..."
exit 1
else
tail -f error.log | grep "$1"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment