Skip to content

Commit 03f870c

Browse files
committed
add stack method
1 parent cc57a52 commit 03f870c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Illuminate/Log/LogManager.php

+15
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ public function __construct($app)
6565
$this->app = $app;
6666
}
6767

68+
/**
69+
* Create a new, on-demand aggregate logger instance.
70+
*
71+
* @param array $channels
72+
* @param string|null $channel
73+
* @return \Psr\Log\LoggerInterface
74+
*/
75+
public function stack(array $channels, $channel = null)
76+
{
77+
return new Logger(
78+
$this->createAggregateDriver(compact('channels', 'channel')),
79+
$this->app['events']
80+
);
81+
}
82+
6883
/**
6984
* Get a log channel instance.
7085
*

0 commit comments

Comments
 (0)