Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / consolidation / robo / src / Log / RoboLogger.php
diff --git a/vendor/consolidation/robo/src/Log/RoboLogger.php b/vendor/consolidation/robo/src/Log/RoboLogger.php
new file mode 100644 (file)
index 0000000..75cf23f
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+namespace Robo\Log;
+
+use Consolidation\Log\Logger;
+
+use Psr\Log\LogLevel;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Robo's default logger
+ */
+class RoboLogger extends Logger
+{
+    /**
+     * @param \Symfony\Component\Console\Output\OutputInterface $output
+     */
+    public function __construct(OutputInterface $output)
+    {
+        // In Robo, we use log level 'notice' for messages that appear all
+        // the time, and 'info' for messages that appear only during verbose
+        // output. We have no 'very verbose' (-vv) level. 'Debug' is -vvv, as usual.
+        $roboVerbosityOverrides = [
+            RoboLogLevel::SIMULATED_ACTION => OutputInterface::VERBOSITY_NORMAL, // Default is "verbose"
+            LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, // Default is "verbose"
+            LogLevel::INFO => OutputInterface::VERBOSITY_VERBOSE, // Default is "very verbose"
+        ];
+        parent::__construct($output, $roboVerbosityOverrides);
+    }
+}