Created
August 19, 2018 00:06
-
-
Save jakebathman/a1122071428c78942c6bed4cade18dd6 to your computer and use it in GitHub Desktop.
Tail Laravel logs and filter out the stack traces
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
tail -f -n 450 storage/logs/laravel*.log \ | |
| grep -i -E \ | |
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
--color |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on opening a new tab it will check for the file Laravel log file and will throw an error that file doesn't exist, which is annoying
so I guess it would be better to check if the directory actually exists first before reading/writing from the file
NOTE: this scenario will happen if you adding these two functions two your .zshrc file or .bashrc file, so I had to add an extra condition.
hope this helps.