| 1 | <?php namespace Understand\UnderstandLaravel5\Handlers; |
||
| 7 | class MonologHandler extends AbstractHandler |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Mapping between numeric constant and string |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $levelMap = [ |
||
| 15 | Logger::DEBUG => 'debug', |
||
| 16 | Logger::INFO => 'info', |
||
| 17 | Logger::NOTICE => 'notice', |
||
| 18 | Logger::WARNING => 'warning', |
||
| 19 | Logger::ERROR => 'error', |
||
| 20 | Logger::CRITICAL => 'critical', |
||
| 21 | Logger::ALERT => 'alert', |
||
| 22 | Logger::EMERGENCY => 'emergency', |
||
| 23 | ]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string|int $level The minimum logging level at which this handler will be triggered |
||
| 27 | * @param bool $bubble Whether the messages that are handled can bubble up the stack or not |
||
| 28 | */ |
||
| 29 | public function __construct($level = Logger::DEBUG, $bubble = true) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Handle the logging of the record. |
||
| 36 | * |
||
| 37 | * @param array $record |
||
| 38 | * @return bool|void |
||
| 39 | */ |
||
| 40 | public function handle(array $record) |
||
| 47 | } |