/home/techb158/exp.abdallabala.com/vendor/monolog/monolog/src/Monolog/Handler
NameSizeModeActions
Curl/-0755rm
FingersCrossed/-0755rm
Slack/-0755rm
SyslogUdp/-0755rm
AbstractHandler.php43900644editdlrm
AbstractProcessingHandler.php15320644editdlrm
AbstractSyslogHandler.php33710644editdlrm
AmqpHandler.php38660644editdlrm
BrowserConsoleHandler.php74010644editdlrm
BufferHandler.php40300644editdlrm
ChromePHPHandler.php56540644editdlrm
CouchDBHandler.php19530644editdlrm
CubeHandler.php46620644editdlrm
DeduplicationHandler.php54790644editdlrm
DoctrineCouchDBHandler.php10000644editdlrm
DynamoDbHandler.php24850644editdlrm
ElasticSearchHandler.php34130644editdlrm
ErrorLogHandler.php23680644editdlrm
FilterHandler.php51480644editdlrm
FingersCrossedHandler.php66130644editdlrm
FirePHPHandler.php54620644editdlrm
FleepHookHandler.php33630644editdlrm
FlowdockHandler.php33820644editdlrm
FormattableHandlerInterface.php9230644editdlrm
FormattableHandlerTrait.php13940644editdlrm
GelfHandler.php19940644editdlrm
GroupHandler.php27930644editdlrm
HandlerInterface.php25910644editdlrm
HandlerWrapper.php23660644editdlrm
HipChatHandler.php109990644editdlrm
IFTTTHandler.php21390644editdlrm
InsightOpsHandler.php18740644editdlrm
LogEntriesHandler.php16150644editdlrm
LogglyHandler.php26190644editdlrm
MailHandler.php16220644editdlrm
MandrillHandler.php21560644editdlrm
MissingExtensionException.php4500644editdlrm
MongoDBHandler.php16060644editdlrm
NativeMailerHandler.php52060644editdlrm
NewRelicHandler.php62460644editdlrm
NullHandler.php9530644editdlrm
PHPConsoleHandler.php100270644editdlrm
ProcessableHandlerInterface.php10170644editdlrm
ProcessableHandlerTrait.php15990644editdlrm
PsrHandler.php14330644editdlrm
PushoverHandler.php66260644editdlrm
RavenHandler.php74140644editdlrm
RedisHandler.php29600644editdlrm
RollbarHandler.php39420644editdlrm
RotatingFileHandler.php59360644editdlrm
SamplingHandler.php32840644editdlrm
SlackbotHandler.php23800644editdlrm
SlackHandler.php64790644editdlrm
SlackWebhookHandler.php38450644editdlrm
SocketHandler.php98120644editdlrm
StreamHandler.php53190644editdlrm
SwiftMailerHandler.php34360644editdlrm
SyslogHandler.php18430644editdlrm
SyslogUdpHandler.php32200644editdlrm
TestHandler.php53760644editdlrm
WhatFailureGroupHandler.php18410644editdlrm
ZendMonitorHandler.php30020644editdlrm
Edit: /home/techb158/exp.abdallabala.com/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php (5148B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Handler; use Monolog\Logger; use Monolog\Formatter\FormatterInterface; /** * Simple handler wrapper that filters records based on a list of levels * * It can be configured with an exact list of levels to allow, or a min/max level. * * @author Hennadiy Verkh * @author Jordi Boggiano */ class FilterHandler extends AbstractHandler { /** * Handler or factory callable($record, $this) * * @var callable|\Monolog\Handler\HandlerInterface */ protected $handler; /** * Minimum level for logs that are passed to handler * * @var int[] */ protected $acceptedLevels; /** * Whether the messages that are handled can bubble up the stack or not * * @var bool */ protected $bubble; /** * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $filterHandler). * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) { $this->handler = $handler; $this->bubble = $bubble; $this->setAcceptedLevels($minLevelOrList, $maxLevel); if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); } } /** * @return array */ public function getAcceptedLevels() { return array_flip($this->acceptedLevels); } /** * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array */ public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY) { if (is_array($minLevelOrList)) { $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); } else { $minLevelOrList = Logger::toMonologLevel($minLevelOrList); $maxLevel = Logger::toMonologLevel($maxLevel); $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { return $level >= $minLevelOrList && $level <= $maxLevel; })); } $this->acceptedLevels = array_flip($acceptedLevels); } /** * {@inheritdoc} */ public function isHandling(array $record) { return isset($this->acceptedLevels[$record['level']]); } /** * {@inheritdoc} */ public function handle(array $record) { if (!$this->isHandling($record)) { return false; } if ($this->processors) { foreach ($this->processors as $processor) { $record = call_user_func($processor, $record); } } $this->getHandler($record)->handle($record); return false === $this->bubble; } /** * {@inheritdoc} */ public function handleBatch(array $records) { $filtered = array(); foreach ($records as $record) { if ($this->isHandling($record)) { $filtered[] = $record; } } if (count($filtered) > 0) { $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered); } } /** * Return the nested handler * * If the handler was provided as a factory callable, this will trigger the handler's instantiation. * * @return HandlerInterface */ public function getHandler(array $record = null) { if (!$this->handler instanceof HandlerInterface) { $this->handler = call_user_func($this->handler, $record, $this); if (!$this->handler instanceof HandlerInterface) { throw new \RuntimeException("The factory callable should return a HandlerInterface"); } } return $this->handler; } /** * {@inheritdoc} */ public function setFormatter(FormatterInterface $formatter) { $this->getHandler()->setFormatter($formatter); return $this; } /** * {@inheritdoc} */ public function getFormatter() { return $this->getHandler()->getFormatter(); } }