Skip to content

Instantly share code, notes, and snippets.

@iturgeon
Created January 12, 2012 17:11
Show Gist options
  • Save iturgeon/1601790 to your computer and use it in GitHub Desktop.
Save iturgeon/1601790 to your computer and use it in GitHub Desktop.
Auto locate and tail the newest FuelPHP error log
#!/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"
@iturgeon
Copy link
Author

Usage:
$ fuel-error /web/vhosts/site/fuel/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment