Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| SAPILogger | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| write | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php declare(strict_types=1); |
| 2 | /* |
| 3 | * This file is part of Aplus Framework Log Library. |
| 4 | * |
| 5 | * (c) Natan Felles <natanfelles@gmail.com> |
| 6 | * |
| 7 | * For the full copyright and license information, please view the LICENSE |
| 8 | * file that was distributed with this source code. |
| 9 | */ |
| 10 | namespace Framework\Log\Loggers; |
| 11 | |
| 12 | use Framework\Log\Log; |
| 13 | use Framework\Log\Logger; |
| 14 | use Framework\Log\LogLevel; |
| 15 | |
| 16 | /** |
| 17 | * Class SAPILogger. |
| 18 | * |
| 19 | * @package log |
| 20 | */ |
| 21 | class SAPILogger extends Logger |
| 22 | { |
| 23 | public function __construct( |
| 24 | string $destination = '', |
| 25 | LogLevel $level = LogLevel::DEBUG, |
| 26 | array $config = [] |
| 27 | ) { |
| 28 | parent::__construct($destination, $level, $config); |
| 29 | } |
| 30 | |
| 31 | protected function write(Log $log) : bool |
| 32 | { |
| 33 | return \error_log($log . ' ', 4); |
| 34 | } |
| 35 | } |