Skip to content

Instantly share code, notes, and snippets.

@mwender
Created July 23, 2025 19:43
Show Gist options
  • Save mwender/5374dd0cdea5c63911ecc827cad70e8a to your computer and use it in GitHub Desktop.
Save mwender/5374dd0cdea5c63911ecc827cad70e8a to your computer and use it in GitHub Desktop.
[tail cmd with filters] Example of using `tail` while filtering out less critical messages #bash
# -----------------------------------------------------------------------------
# Tail WordPress debug.log while excluding PHP Warnings and Deprecated messages
#
# This command tails the debug.log file and filters out lines containing
# "PHP Warning:" or "PHP Deprecated:" using grep.
#
# Useful for developers who want to monitor logs without noise from
# less-critical PHP messages.
#
# Usage:
# tail -f debug.log | grep -vE 'PHP Warning:|PHP Deprecated:'
# -----------------------------------------------------------------------------
tail -f debug.log | grep -vE 'PHP Warning:|PHP Deprecated:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment