/
home
/
techb158
/
exp.abdallabala.com
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Handler
/
/home/techb158/exp.abdallabala.com/vendor/monolog/monolog/src/Monolog/Handler
mkdir
upload
Name
Size
Mode
Actions
Curl/
-
0755
rm
FingersCrossed/
-
0755
rm
Slack/
-
0755
rm
SyslogUdp/
-
0755
rm
AbstractHandler.php
4390
0644
edit
dl
rm
AbstractProcessingHandler.php
1532
0644
edit
dl
rm
AbstractSyslogHandler.php
3371
0644
edit
dl
rm
AmqpHandler.php
3866
0644
edit
dl
rm
BrowserConsoleHandler.php
7401
0644
edit
dl
rm
BufferHandler.php
4030
0644
edit
dl
rm
ChromePHPHandler.php
5654
0644
edit
dl
rm
CouchDBHandler.php
1953
0644
edit
dl
rm
CubeHandler.php
4662
0644
edit
dl
rm
DeduplicationHandler.php
5479
0644
edit
dl
rm
DoctrineCouchDBHandler.php
1000
0644
edit
dl
rm
DynamoDbHandler.php
2485
0644
edit
dl
rm
ElasticSearchHandler.php
3413
0644
edit
dl
rm
ErrorLogHandler.php
2368
0644
edit
dl
rm
FilterHandler.php
5148
0644
edit
dl
rm
FingersCrossedHandler.php
6613
0644
edit
dl
rm
FirePHPHandler.php
5462
0644
edit
dl
rm
FleepHookHandler.php
3363
0644
edit
dl
rm
FlowdockHandler.php
3382
0644
edit
dl
rm
FormattableHandlerInterface.php
923
0644
edit
dl
rm
FormattableHandlerTrait.php
1394
0644
edit
dl
rm
GelfHandler.php
1994
0644
edit
dl
rm
GroupHandler.php
2793
0644
edit
dl
rm
HandlerInterface.php
2591
0644
edit
dl
rm
HandlerWrapper.php
2366
0644
edit
dl
rm
HipChatHandler.php
10999
0644
edit
dl
rm
IFTTTHandler.php
2139
0644
edit
dl
rm
InsightOpsHandler.php
1874
0644
edit
dl
rm
LogEntriesHandler.php
1615
0644
edit
dl
rm
LogglyHandler.php
2619
0644
edit
dl
rm
MailHandler.php
1622
0644
edit
dl
rm
MandrillHandler.php
2156
0644
edit
dl
rm
MissingExtensionException.php
450
0644
edit
dl
rm
MongoDBHandler.php
1606
0644
edit
dl
rm
NativeMailerHandler.php
5206
0644
edit
dl
rm
NewRelicHandler.php
6246
0644
edit
dl
rm
NullHandler.php
953
0644
edit
dl
rm
PHPConsoleHandler.php
10027
0644
edit
dl
rm
ProcessableHandlerInterface.php
1017
0644
edit
dl
rm
ProcessableHandlerTrait.php
1599
0644
edit
dl
rm
PsrHandler.php
1433
0644
edit
dl
rm
PushoverHandler.php
6626
0644
edit
dl
rm
RavenHandler.php
7414
0644
edit
dl
rm
RedisHandler.php
2960
0644
edit
dl
rm
RollbarHandler.php
3942
0644
edit
dl
rm
RotatingFileHandler.php
5936
0644
edit
dl
rm
SamplingHandler.php
3284
0644
edit
dl
rm
SlackbotHandler.php
2380
0644
edit
dl
rm
SlackHandler.php
6479
0644
edit
dl
rm
SlackWebhookHandler.php
3845
0644
edit
dl
rm
SocketHandler.php
9812
0644
edit
dl
rm
StreamHandler.php
5319
0644
edit
dl
rm
SwiftMailerHandler.php
3436
0644
edit
dl
rm
SyslogHandler.php
1843
0644
edit
dl
rm
SyslogUdpHandler.php
3220
0644
edit
dl
rm
TestHandler.php
5376
0644
edit
dl
rm
WhatFailureGroupHandler.php
1841
0644
edit
dl
rm
ZendMonitorHandler.php
3002
0644
edit
dl
rm
Edit:
/home/techb158/exp.abdallabala.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
(5319B)
<?php /* * This file is part of the Monolog package. * * (c) Jordi Boggiano <j.boggiano@seld.be> * * 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\Utils; /** * Stores to any stream resource * * Can be used to store into php://stderr, remote and local files, etc. * * @author Jordi Boggiano <j.boggiano@seld.be> */ class StreamHandler extends AbstractProcessingHandler { protected $stream; protected $url; private $errorMessage; protected $filePermission; protected $useLocking; private $dirCreated; /** * @param resource|string $stream * @param 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 int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) * @param bool $useLocking Try to lock log file before doing any writes * * @throws \Exception If a missing directory is not buildable * @throws \InvalidArgumentException If stream is not a resource or string */ public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) { parent::__construct($level, $bubble); if (is_resource($stream)) { $this->stream = $stream; } elseif (is_string($stream)) { $this->url = Utils::canonicalizePath($stream); } else { throw new \InvalidArgumentException('A stream must either be a resource or a string.'); } $this->filePermission = $filePermission; $this->useLocking = $useLocking; } /** * {@inheritdoc} */ public function close() { if ($this->url && is_resource($this->stream)) { fclose($this->stream); } $this->stream = null; $this->dirCreated = null; } /** * Return the currently active stream if it is open * * @return resource|null */ public function getStream() { return $this->stream; } /** * Return the stream URL if it was configured with a URL and not an active resource * * @return string|null */ public function getUrl() { return $this->url; } /** * {@inheritdoc} */ protected function write(array $record) { if (!is_resource($this->stream)) { if (null === $this->url || '' === $this->url) { throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); } $this->createDir(); $this->errorMessage = null; set_error_handler(array($this, 'customErrorHandler')); $this->stream = fopen($this->url, 'a'); if ($this->filePermission !== null) { @chmod($this->url, $this->filePermission); } restore_error_handler(); if (!is_resource($this->stream)) { $this->stream = null; throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $this->url)); } } if ($this->useLocking) { // ignoring errors here, there's not much we can do about them flock($this->stream, LOCK_EX); } $this->streamWrite($this->stream, $record); if ($this->useLocking) { flock($this->stream, LOCK_UN); } } /** * Write to stream * @param resource $stream * @param array $record */ protected function streamWrite($stream, array $record) { fwrite($stream, (string) $record['formatted']); } private function customErrorHandler($code, $msg) { $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); } /** * @param string $stream * * @return null|string */ private function getDirFromStream($stream) { $pos = strpos($stream, '://'); if ($pos === false) { return dirname($stream); } if ('file://' === substr($stream, 0, 7)) { return dirname(substr($stream, 7)); } return null; } private function createDir() { // Do not try to create dir if it has already been tried. if ($this->dirCreated) { return; } $dir = $this->getDirFromStream($this->url); if (null !== $dir && !is_dir($dir)) { $this->errorMessage = null; set_error_handler(array($this, 'customErrorHandler')); $status = mkdir($dir, 0777, true); restore_error_handler(); if (false === $status && !is_dir($dir)) { throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); } } $this->dirCreated = true; } }
Save
cmd:
run