When to use drush_log() or drush_set_error()?
In general, you should avoid using the status code 'error' when calling drush_log directly. Use drush_log to signal non-terminal events, usually with a status code of warning or notice.

If a function fails and cannot continue, the best thing to do is to exit with return drush_set_error(...);. This sets internal state, so that Drush knows that there was an unrecoverable error, and calls through to drush_log('Message', 'error');.