Closed (fixed)
Project:
Drush
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2009 at 18:19 UTC
Updated:
4 Aug 2010 at 18:50 UTC
Jump to comment: Most recent file
Now, drush reports on only messages of type error. Lets add all the other messages to the log.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | drush.inc-messages.patch | 364 bytes | thebuckst0p |
Comments
Comment #1
moshe weitzman commentedany objection?
Comment #2
greg.1.anderson commentedSeems like a good idea to me. The fact that they are not logged is currently kind of mysterious. Logging them all seems more appropriate (principal of least astonishment...)
Comment #3
moshe weitzman commentedCommitted this. I don't think this will log excessively but feel free to reopen if you think so.
Comment #5
thebuckst0p commentedHi Moshe,
The
_drush_print_log()callback to_drush_log_drupal_messages()(as far as I can tell, the best way to turn regular messages into drush messages for drush batch scripts) doesn't include the "status" message type in its output, but that's the default fordrupal_set_message().The attached patch adds 'status' to the
switch().Thanks,
Ben
Comment #6
moshe weitzman commentedRegular 'status' messages fall through to the 'default' case and are always printed. You think this is undesireable?
Comment #7
thebuckst0p commentedThat's weird, it didn't output at all for me and I had --verbose on. Let me try again...
Comment #8
thebuckst0p commentedSo here's my [test] script:
I run it with
drush php-script SCRIPTand it normally outputs nothing. When I add the 'status' patch it outputs "test" as it should.So it looks like the default message requires 'debug' to be on, not just verbose. Debug has a lot of extraneous [debugging] output that isn't a "message" per se. I guess it seems that messages should either always output or should output in verbose. My use case was batch-scripting PathAuto which has its own drupal_set_message notices that I wanted to be visible in my script; anything similar calling standard Drupal APIs would probably be the same way.
It's not a huge deal, I can patch it or turn on debugging for my own use case, I was just surprised.
Thanks,
Ben
Comment #9
moshe weitzman commentedright you are. committed. hopefully this doesn't clutter the output of verbose too badly.