/home/techb158/ileadtechnology.com/SSM/vendor/monolog/monolog/src/Monolog/Handler
NameSizeModeActions
Curl/-0755rm
FingersCrossed/-0755rm
Slack/-0755rm
SyslogUdp/-0755rm
AbstractHandler.php22870644editdlrm
AbstractProcessingHandler.php14330644editdlrm
AbstractSyslogHandler.php35840644editdlrm
AmqpHandler.php40380644editdlrm
BrowserConsoleHandler.php76220644editdlrm
BufferHandler.php42010644editdlrm
ChromePHPHandler.php52050644editdlrm
CouchDBHandler.php20320644editdlrm
CubeHandler.php48490644editdlrm
DeduplicationHandler.php56950644editdlrm
DoctrineCouchDBHandler.php10980644editdlrm
DynamoDbHandler.php23740644editdlrm
ElasticaHandler.php33850644editdlrm
ElasticsearchHandler.php54700644editdlrm
ErrorLogHandler.php25120644editdlrm
FallbackGroupHandler.php13840644editdlrm
FilterHandler.php53710644editdlrm
FingersCrossedHandler.php71120644editdlrm
FirePHPHandler.php48970644editdlrm
FleepHookHandler.php33190644editdlrm
FlowdockHandler.php32540644editdlrm
FormattableHandlerInterface.php8450644editdlrm
FormattableHandlerTrait.php13200644editdlrm
GelfHandler.php16220644editdlrm
GroupHandler.php29570644editdlrm
Handler.php10290644editdlrm
HandlerInterface.php27780644editdlrm
HandlerWrapper.php33380644editdlrm
IFTTTHandler.php21950644editdlrm
InsightOpsHandler.php18950644editdlrm
LogEntriesHandler.php17140644editdlrm
LogglyHandler.php41860644editdlrm
LogmaticHandler.php25020644editdlrm
MailHandler.php20660644editdlrm
MandrillHandler.php24860644editdlrm
MissingExtensionException.php4730644editdlrm
MongoDBHandler.php26720644editdlrm
NativeMailerHandler.php51650644editdlrm
NewRelicHandler.php63660644editdlrm
NoopHandler.php8800644editdlrm
NullHandler.php11420644editdlrm
OverflowHandler.php44260644editdlrm
PHPConsoleHandler.php102680644editdlrm
ProcessableHandlerInterface.php9480644editdlrm
ProcessableHandlerTrait.php15340644editdlrm
ProcessHandler.php54230644editdlrm
PsrHandler.php26510644editdlrm
PushoverHandler.php70250644editdlrm
RedisHandler.php30050644editdlrm
RollbarHandler.php35500644editdlrm
RotatingFileHandler.php61410644editdlrm
SamplingHandler.php34230644editdlrm
SendGridHandler.php29040644editdlrm
SlackHandler.php66680644editdlrm
SlackWebhookHandler.php40290644editdlrm
SocketHandler.php99210644editdlrm
SqsHandler.php17830644editdlrm
StreamHandler.php53700644editdlrm
SwiftMailerHandler.php31950644editdlrm
SyslogHandler.php20030644editdlrm
SyslogUdpHandler.php35810644editdlrm
TelegramBotHandler.php27800644editdlrm
TestHandler.php56840644editdlrm
WebRequestRecognizerTrait.php5240644editdlrm
WhatFailureGroupHandler.php15330644editdlrm
ZendMonitorHandler.php31730644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php (4201B)
* * 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\ResettableInterface; use Monolog\Formatter\FormatterInterface; /** * Buffers all records until closing the handler and then pass them as batch. * * This is useful for a MailHandler to send only one mail per request instead of * sending one per log message. * * @author Christophe Coevoet */ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface { use ProcessableHandlerTrait; protected $handler; protected $bufferSize = 0; protected $bufferLimit; protected $flushOnOverflow; protected $buffer = []; protected $initialized = false; /** * @param HandlerInterface $handler Handler. * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. * @param string|int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded */ public function __construct(HandlerInterface $handler, int $bufferLimit = 0, $level = Logger::DEBUG, bool $bubble = true, bool $flushOnOverflow = false) { parent::__construct($level, $bubble); $this->handler = $handler; $this->bufferLimit = $bufferLimit; $this->flushOnOverflow = $flushOnOverflow; } /** * {@inheritdoc} */ public function handle(array $record): bool { if ($record['level'] < $this->level) { return false; } if (!$this->initialized) { // __destructor() doesn't get called on Fatal errors register_shutdown_function([$this, 'close']); $this->initialized = true; } if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { if ($this->flushOnOverflow) { $this->flush(); } else { array_shift($this->buffer); $this->bufferSize--; } } if ($this->processors) { $record = $this->processRecord($record); } $this->buffer[] = $record; $this->bufferSize++; return false === $this->bubble; } public function flush(): void { if ($this->bufferSize === 0) { return; } $this->handler->handleBatch($this->buffer); $this->clear(); } public function __destruct() { // suppress the parent behavior since we already have register_shutdown_function() // to call close(), and the reference contained there will prevent this from being // GC'd until the end of the request } /** * {@inheritdoc} */ public function close(): void { $this->flush(); $this->handler->close(); } /** * Clears the buffer without flushing any messages down to the wrapped handler. */ public function clear(): void { $this->bufferSize = 0; $this->buffer = []; } public function reset() { $this->flush(); parent::reset(); $this->resetProcessors(); if ($this->handler instanceof ResettableInterface) { $this->handler->reset(); } } /** * {@inheritdoc} */ public function setFormatter(FormatterInterface $formatter): HandlerInterface { $this->handler->setFormatter($formatter); return $this; } /** * {@inheritdoc} */ public function getFormatter(): FormatterInterface { return $this->handler->getFormatter(); } }