Commit 37057c72 authored by Jon Pugh's avatar Jon Pugh

Allow log type to be defined by implementors.

parent 0e99c03b
......@@ -460,7 +460,7 @@ function provision_backend_invoke($target, $command, $arguments = array(), $data
* @return string|void
* The output or error output of the command.
*/
function provision_process($command, $cwd = null, $label = 'Process', $env = array(), $log_output = TRUE, $error_message = NULL, $throw_drush_error = TRUE) {
function provision_process($command, $cwd = null, $label = 'Process', $env = array(), $log_output = TRUE, $error_message = NULL, $throw_drush_error = TRUE, $log_type = 'p_info') {
if (empty($command)) {
return;
}
......@@ -481,8 +481,8 @@ function provision_process($command, $cwd = null, $label = 'Process', $env = arr
if ($log_output) {
drush_log("[$label] $command", 'p_command');
$exit_code = $process->run(function ($type, $buffer) {
drush_log($buffer, 'p_info');
$exit_code = $process->run(function ($type, $buffer) use ($log_type) {
drush_log($buffer, $log_type);
});
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment