-
-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure all handlers are explicitly closed on kernel shutdown
Fixes #376
- Loading branch information
1 parent
a5b28e1
commit 5c10161
Showing
5 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
|
||
namespace Symfony\Bundle\MonologBundle\Services; | ||
|
||
|
||
use Monolog\Handler\HandlerInterface; | ||
|
||
class HandlerManager | ||
{ | ||
|
||
/** | ||
* @var HandlerInterface[] | ||
*/ | ||
private $handlers; | ||
|
||
public function __construct(array $handlers) | ||
{ | ||
$this->handlers = $handlers; | ||
} | ||
|
||
public function close() | ||
{ | ||
foreach ($this->handlers as $handler) { | ||
$handler->close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters