diff --git a/src/Illuminate/Log/LogManager.php b/src/Illuminate/Log/LogManager.php index 3629e1c2c629..b9514d2d1106 100644 --- a/src/Illuminate/Log/LogManager.php +++ b/src/Illuminate/Log/LogManager.php @@ -65,6 +65,21 @@ public function __construct($app) $this->app = $app; } + /** + * Create a new, on-demand aggregate logger instance. + * + * @param array $channels + * @param string|null $channel + * @return \Psr\Log\LoggerInterface + */ + public function stack(array $channels, $channel = null) + { + return new Logger( + $this->createAggregateDriver(compact('channels', 'channel')), + $this->app['events'] + ); + } + /** * Get a log channel instance. *