Skip to content

Commit

Permalink
dont cache ondemand loggers
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 4, 2021
1 parent f429789 commit 5afa0f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Log/LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ public function getChannels()
protected function get($name, ?array $config = null)
{
try {
if ($name === 'ondemand' && ! empty($config)) {
unset($this->channels['ondemand']);
}

return $this->channels[$name] ?? with($this->resolve($name, $config), function ($logger) use ($name) {
return $this->channels[$name] = $this->tap($name, new Logger($logger, $this->app['events']));
});
Expand Down

0 comments on commit 5afa0f1

Please sign in to comment.