Skip to content

Commit

Permalink
add stack method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 18, 2018
1 parent cc57a52 commit 03f870c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Illuminate/Log/LogManager.php
Expand Up @@ -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.
*
Expand Down

0 comments on commit 03f870c

Please sign in to comment.