Created
June 2, 2010 18:05
-
-
Save bshaffer/422745 to your computer and use it in GitHub Desktop.
useful for traversing your symfony log files and debugging them
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
# 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