Skip to content

Instantly share code, notes, and snippets.

@bshaffer
Created June 2, 2010 18:05
Show Gist options
  • Save bshaffer/422745 to your computer and use it in GitHub Desktop.
Save bshaffer/422745 to your computer and use it in GitHub Desktop.
useful for traversing your symfony log files and debugging them
# The first argument is the application (default: frontend)
export app=$1
if [ ! -n "$app" ]; then
export app="frontend"
fi
# The second argument is the environment. (default: dev)
export env=$2
if [ ! -n "$env" ]; then
export env="dev"
fi
# The third argument is the grep command. (default: debug)
export grep=$3
if [ ! -n "$grep" ]; then
export grep="debug"
fi
export u="_"
export file=$app$u$env.log
echo "tailing $file..."
echo ""
tail -f log/$file | grep $grep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment