When you are emitting information which is important for the logs, use drush_log() instead of drush_print(). This is helpful because command can be executed remotely and drush_log() insures that your log info gets passed back to the caller correctly.

For example, the 'package downloaded' log info should be:

OLD: drush_print("{$this->project->name} downloaded from {$this->project->download['url']}.");
NEW: drush_log("{$this->project->name} downloaded from {$this->project->download['url']}.", 'ok');

Note that you can and should put random debug info into the logs using 'notice' log level. Thats a separate issue.

CommentFileSizeAuthor
#1 drush_log.patch3.73 KBsnufkin

Comments

snufkin’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
StatusFileSize
new3.73 KB

I have patched 2.x-dev, as I see new stuff going there rather than 1.x-dev.

drush_set_error is still the way to go?

dmitrig01’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.