aboutsummaryrefslogtreecommitdiffstats
path: root/includes/shell/CommandFactory.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/shell/CommandFactory.php')
-rw-r--r--includes/shell/CommandFactory.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/includes/shell/CommandFactory.php b/includes/shell/CommandFactory.php
index c0b8f899ed2e..84dd50f71fbb 100644
--- a/includes/shell/CommandFactory.php
+++ b/includes/shell/CommandFactory.php
@@ -37,6 +37,9 @@ class CommandFactory {
/** @var string|bool */
private $cgroup;
+ /** @var bool */
+ private $doLogStderr = false;
+
/**
* Constructor
*
@@ -50,6 +53,16 @@ class CommandFactory {
}
/**
+ * When enabled, text sent to stderr will be logged with a level of 'error'.
+ *
+ * @param bool $yesno
+ * @see Command::logStderr
+ */
+ public function logStderr( $yesno = true ) {
+ $this->doLogStderr = $yesno;
+ }
+
+ /**
* Instantiates a new Command
*
* @return Command
@@ -60,6 +73,7 @@ class CommandFactory {
return $command
->limits( $this->limits )
- ->cgroup( $this->cgroup );
+ ->cgroup( $this->cgroup )
+ ->logStderr( $this->doLogStderr );
}
}