Actually I wrote this feature for drush. Didn't realize this problem untill now.
The explanation: the watchdog message is stored as a text with variables that are replaced by using the t() function. OTOH drush wd search functionality is based on a database query.
That's the output you get:
# drush wd-show --type=php
ID Date Type Severity Message
95 20/Jun 22:28 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
94 20/Jun 22:27 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
93 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
91 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
89 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
88 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
87 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
86 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
85 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
84 20/Jun 22:26 php notice Notice: Undefined variable: output in mothership_item_list() (line 304 of
But that's the database content:
# drush sql-query "SELECT wid,message FROM watchdog WHERE type='php' LIMIT 10"
wid message
27 %type: !message in %function (line %line of %file).
59 %type: !message in %function (line %line of %file).
60 %type: !message in %function (line %line of %file).
61 %type: !message in %function (line %line of %file).
62 %type: !message in %function (line %line of %file).
63 %type: !message in %function (line %line of %file).
64 %type: !message in %function (line %line of %file).
66 %type: !message in %function (line %line of %file).
67 %type: !message in %function (line %line of %file).
68 %type: !message in %function (line %line of %file).
It doesn't seem there's an accurate fix for this. Drush could try to do its best on searching by filtering also by the 'variables' column of the watchdog table though.
ws-show
, which I assumed was a typo. Is there a chance that you were tryingdrush ws-show
? – hw. Jun 10 '13 at 15:14