Drush: Watchdog search explained Can somebody explain how watchdog searching works? I can never get it to locate the log entries I'm looking for.

Let's say I have the following watchdog entries:


476722  10/Jun 10:31  notice    content  page: updated Protective Factors in Elementary School.
476723  10/Jun 10:31  notice    php      Notice: Undefined offset: 3 in _menu_translate() (line 777 of /var/www/html/domainnamehere/includes/menu.inc).
476724  10/Jun 10:40  notice    content  page: updated School/District Administrators.
476725  10/Jun 10:42  notice    content  page: updated Teachers.
476726  10/Jun 10:42  notice    php      Notice: Undefined offset: 3 in _menu_translate() (line 777 of /var/www/html/domainnamehere/includes/menu.inc).


All of following return "No log messages available":

drush wd-show "Undefined offset"
drush wd-show "%Undefined offset%"
drush wd-show "menu_translate"


If I want to find all of the "Undefined offset" watchdog entries, what Drush command do I have to run?
You could just pass the stdout from Drush as the stdin to grep.

Example:

drush wd-show | grep 'Undefined offset'


As a bonus - If you want the errors in a file, try the following:

drush wd-show | grep 'Undefined offset' &gt; ~/Undefined-errors.txt


This'll put the errors into a text file in your home directory :-)