Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drush / drush / src / Preflight / PreflightLog.php
diff --git a/vendor/drush/drush/src/Preflight/PreflightLog.php b/vendor/drush/drush/src/Preflight/PreflightLog.php
new file mode 100644 (file)
index 0000000..8f08a72
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+namespace Drush\Preflight;
+
+class PreflightLog
+{
+
+    protected $debug;
+
+    /**
+     * @return bool
+     */
+    public function getDebug()
+    {
+        return $this->debug;
+    }
+
+    /**
+     * @param bool $debug
+     */
+    public function setDebug($debug)
+    {
+        $this->debug = $debug;
+        return $this;
+    }
+
+    public function log($message)
+    {
+        if ($this->getDebug()) {
+            fwrite(STDERR, ' [preflight] ' . $message . "\n");
+        }
+    }
+}