diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-05-12 11:36:10 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-05-12 16:27:27 +0300 |
commit | 631da0bbdbd6be5d5544ae980d07377732657c89 (patch) | |
tree | 934da6965a8c87cb15c2852ec0119ca6b9f64cfe /lib | |
parent | 4059d9a7dba0305d643be2726759dfc44bd0598c (diff) |
Only print debug logs at debug verbosity
Ref https://symfony.com/doc/current/console/verbosity.html
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/ConsoleLoggerDecorator.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Support/ConsoleLoggerDecorator.php b/lib/Support/ConsoleLoggerDecorator.php index 4828eb34a..20ef27f9f 100644 --- a/lib/Support/ConsoleLoggerDecorator.php +++ b/lib/Support/ConsoleLoggerDecorator.php @@ -85,6 +85,10 @@ class ConsoleLoggerDecorator implements LoggerInterface { } public function debug($message, array $context = []) { + if ($this->consoleOutput->getVerbosity() < OutputInterface::VERBOSITY_DEBUG) { + return; + } + $this->consoleOutput->writeln("[debug] $message"); $this->inner->debug($message, $context); |