PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / 1.8.0
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution v1.8.0
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / Performance / Log / Handlers / Null_Handler.php

Null_Handler.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution 1.8.0, at src/Performance/Log/Handlers/Null_Handler.php

38 lines 670 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Black hole.
4 *
5 * Any record it can handle will be thrown away.
6 *
7 * @package SolidWP\Performance
8 */
9
10 declare( strict_types=1 );
11
12 namespace SolidWP\Performance\Log\Handlers;
13
14 use SolidWP\Performance\Monolog\Handler\AbstractHandler;
15
16 /**
17 * Black hole.
18 *
19 * Any record it can handle will be thrown away.
20 *
21 * @phpstan-import-type Record from \Monolog\Logger
22 */
23 final class Null_Handler extends AbstractHandler {
24
25 /**
26 * Throw all logs away.
27 *
28 * @param array $record The monolog Record.
29 *
30 * @phpstan-param Record $record
31 *
32 * @return bool
33 */
34 public function handle( array $record ): bool {
35 return $record['level'] >= $this->level;
36 }
37 }
38