ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
PsrHandler.php
Go to the documentation of this file.
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
12namespace Monolog\Handler;
13
16
23{
29 protected $logger;
30
37 {
38 parent::__construct($level, $bubble);
39
40 $this->logger = $logger;
41 }
42
46 public function handle(array $record)
47 {
48 if (!$this->isHandling($record)) {
49 return false;
50 }
51
52 $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']);
53
54 return false === $this->bubble;
55 }
56}
Base Handler class providing the Handler structure.
isHandling(array $record)
{Checks whether the given record will be handled by this handler.This is mostly done for performance ...
Proxies log messages to an existing PSR-3 compliant logger.
Definition: PsrHandler.php:23
__construct(LoggerInterface $logger, $level=Logger::DEBUG, $bubble=true)
Definition: PsrHandler.php:36
handle(array $record)
Handles a record.All records may be passed to this method, and the handler should discard those that ...
Definition: PsrHandler.php:46
Monolog log channel.
Definition: Logger.php:28
const DEBUG
Detailed debug information.
Definition: Logger.php:32
Describes a logger instance.