|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
/* |
|
|
4 |
* This file is part of the Monolog package. |
|
|
5 |
* |
|
|
6 |
* (c) Jordi Boggiano <j.boggiano@seld.be> |
|
|
7 |
* |
|
|
8 |
* For the full copyright and license information, please view the LICENSE |
|
|
9 |
* file that was distributed with this source code. |
|
|
10 |
*/ |
|
|
11 |
|
|
|
12 |
namespace Monolog\Handler; |
|
|
13 |
|
|
|
14 |
use Monolog\Logger; |
|
|
15 |
|
|
|
16 |
/** |
|
|
17 |
* Blackhole |
|
|
18 |
* |
|
|
19 |
* Any record it can handle will be thrown away. This can be used |
|
|
20 |
* to put on top of an existing stack to override it temporarily. |
|
|
21 |
* |
|
|
22 |
* @author Jordi Boggiano <j.boggiano@seld.be> |
|
|
23 |
*/ |
|
|
24 |
class NullHandler extends AbstractHandler |
|
|
25 |
{ |
|
|
26 |
/** |
|
|
27 |
* {@inheritdoc} |
|
|
28 |
*/ |
|
|
29 |
public function handle(array $record) |
|
|
30 |
{ |
|
|
31 |
if ($record['level'] < $this->level) { |
|
|
32 |
return false; |
|
|
33 |
} |
|
|
34 |
|
|
|
35 |
return true; |
|
|
36 |
} |
|
|
37 |
} |