You are here

function _hosting_task_log_print in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 task.hosting.inc \_hosting_task_log_print()

Switch between Drush 8's OO logging and the older private function.

1 call to _hosting_task_log_print()
_hosting_task_log in ./task.hosting.inc
Log a message to the current task's node if possible, the screen otherwise.

File

./task.hosting.inc, line 27
Drush include for the Hosting module's hosting task command.

Code

function _hosting_task_log_print($entry) {
  if (function_exists('_drush_print_log')) {

    // Remove after dropping Drush 6 comaptibility.
    return _drush_print_log($entry);
  }
  else {
    $logger = new Drush\Log\Logger();
    return $logger
      ->log($entry['type'], $entry['message'], $entry);
  }
}