Skip to content

Commit

Permalink
More flexibility for custom log drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored Feb 15, 2018
1 parent a829ca7 commit 71d7be9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Log/LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ protected function callCustomCreator(array $config)
*/
protected function createCustomDriver(array $config)
{
return $this->app->make($config['via'])->__invoke($config);
$f = is_callable($via = $config['via']) ? $via : $this->app->make($via);

return $f($config);
}

/**
Expand Down

0 comments on commit 71d7be9

Please sign in to comment.