drush-ops / drush

Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.
https://www.drush.org
2.34k stars 1.08k forks source link

Document Watchdog argument doesn't check all parts of a message #6149

Closed gitressa closed 3 weeks ago

gitressa commented 3 weeks ago

Existing document

So, this is a bit of an edge case ... But in the documentation, there is an entry about using arguments:

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

What are you attempting to do

It works great! Except if you search for a sub-string in a URL ("translations" is in the URL):

$ drush watchdog:show "translations"
 [notice] No log messages available.
$ drush watchdog:show
 -------- -------------- ---------------- -------------- ------------------------------------------------------------------------------------------------------------ 
  ID       Date           Type             Severity       Message                                                                                                     
 -------- -------------- ---------------- -------------- ------------------------------------------------------------------------------------------------------------ 
  510081   30/Oct 12:36   locale           Notification   Translation file not found: https://ftp.drupal.org/files/translations/all/webform/webform-6.2.7.en.po.    

In what way is the existing documentation unclear or incomplete

It's not clear that parts of a Message will not be searched.

What should the documentation say instead?

Either:

weitzman commented 3 weeks ago

Yes, that would be helpful.

Alas its impossible for Drush to know which parts are "context" and replaced into the message outside of the Message field. That knowledge is in locale module. I'm not sure a blanket "this might not work" disclaimer is appropriate in the description of a usage example.

gitressa commented 3 weeks ago

Yes, it's probably going to be relevant very seldom, and adding a "might not work" caveat overkill ... So let's close it, and if someone runs into this, they may find this issue, if they search for argument and ignored, or similar terms.