Skip to content

Commit bc50a9b

Browse files
committed
simplify disk change
1 parent 5afa0f1 commit bc50a9b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Illuminate/Log/LogManager.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ public function __construct($app)
6969
*/
7070
public function build(array $config)
7171
{
72+
unset($this->channels['ondemand']);
73+
7274
return $this->get('ondemand', $config);
7375
}
7476

@@ -127,10 +129,6 @@ public function getChannels()
127129
protected function get($name, ?array $config = null)
128130
{
129131
try {
130-
if ($name === 'ondemand' && ! empty($config)) {
131-
unset($this->channels['ondemand']);
132-
}
133-
134132
return $this->channels[$name] ?? with($this->resolve($name, $config), function ($logger) use ($name) {
135133
return $this->channels[$name] = $this->tap($name, new Logger($logger, $this->app['events']));
136134
});

0 commit comments

Comments
 (0)