Created
January 12, 2012 17:11
-
-
Save iturgeon/1601790 to your computer and use it in GitHub Desktop.
Auto locate and tail the newest FuelPHP error log
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
#!/bin/sh | |
ARGS='noargs' | |
if [ $1 ] ; then | |
LOG_DIR=$1 | |
else | |
echo 'Missing Required Arugments: root dir of fuel /dir/to/fuel/' | |
exit | |
fi | |
LOG_FILE=`find "$LOG_DIR"app/\logs -type f | sort -n | tail -1 | cut -f2- -d" "` | |
echo ==============='SHOWING FUEL ERROR LOG ===============' | |
echo $LOG_FILE | |
echo '=====================================================' | |
tail -f "$LOG_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
$ fuel-error /web/vhosts/site/fuel/