Skip to content

Commit

Permalink
simplify disk change
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 4, 2021
1 parent 5afa0f1 commit bc50a9b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Illuminate/Log/LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public function __construct($app)
*/
public function build(array $config)
{
unset($this->channels['ondemand']);

return $this->get('ondemand', $config);
}

Expand Down Expand Up @@ -127,10 +129,6 @@ 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 bc50a9b

Please sign in to comment.