Skip to content

Commit f267ec8

Browse files
committed
[Monolog] Disable DebugLogger in CLI
1 parent 7e745f7 commit f267ec8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Logger.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@ public function reset()
7575
$this->clear();
7676
}
7777

78+
public function removeDebugLogger()
79+
{
80+
foreach ($this->processors as $k => $processor) {
81+
if ($processor instanceof DebugLoggerInterface) {
82+
unset($this->processors[$k]);
83+
}
84+
}
85+
86+
foreach ($this->handlers as $k => $handler) {
87+
if ($handler instanceof DebugLoggerInterface) {
88+
unset($this->handlers[$k]);
89+
}
90+
}
91+
}
92+
7893
/**
7994
* Returns a DebugLoggerInterface instance if one is registered with this logger.
8095
*

0 commit comments

Comments
 (0)