Skip to content

Instantly share code, notes, and snippets.

@paulredmond
Last active July 12, 2021 17:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulredmond/7bbb8fcc3036fe2db655bbbbaf623cf4 to your computer and use it in GitHub Desktop.
Save paulredmond/7bbb8fcc3036fe2db655bbbbaf623cf4 to your computer and use it in GitHub Desktop.
Aliases to clear Laravel logs
# Must run from the root of a Laravel app
alias clearlog="truncate -s 0 $PWD/storage/logs/laravel.log"
alias clearlogs="truncate -s 0 $PWD/storage/logs/*.log"
# Or using git rev-parse
alias clearlog="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/laravel.log"
alias clearlogs="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/*.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment