ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
12 namespace Monolog\Handler;
13 
14 use Monolog\Logger;
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 }
Proxies log messages to an existing PSR-3 compliant logger.
Definition: PsrHandler.php:22
Base Handler class providing the Handler structure.
const DEBUG
Detailed debug information.
Definition: Logger.php:32
__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
Create styles array
The data for the language used.
isHandling(array $record)
{Checks whether the given record will be handled by this handler.This is mostly done for performance ...
Describes a logger instance.