On a test instance, drush watchdog-show shows, among three other entries, a message starting with "Notice: Undefined property:". However, both of the following commands print nothing at all:

drush watchdog-show "Notice"
drush watchdog-show "Undefined property"

drush watchdog-show ":" does print the message, but also other irrelevant message. So how do I search watchdog messages like it says in the documentation:

drush watchdog-show "cron run succesful" Show a listing of most recent 10 messages containing the string "cron run succesful".



No. Or maybe yes - broken for all versions of Drush. The problem is that Drush only searches the message column of the watchdog table, not the variables column too. A watchdog entry is built-up by a message - format string - where a variable can be inserted. If the text you are looking for is in the variable part, Drush won't find it.

Yes, this is very annoying. There is a related Drush bug - see https://github.com/drush-ops/drush/issues/408 Maybe you should comment and ask for re-opening?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.