restore_error_handler(); } if (!is_resource($stream)) { $this->stream = null; throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record)); } stream_set_chunk_size($stream, $this->streamChunkSize); $this->stream = $stream; } $record = $this->processRecord($record); } $record['formatted'] = $this->getFormatter()->format($record); $this->write($record); return false === $this->bubble; } /** } } // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted try { if (true === $handler->handle($record)) { break; } } catch (Throwable $e) { $this->handleException($e, $record); * @param string|Stringable $message The log message * @param mixed[] $context The log context */ public function error($message, array $context = []): void { $this->addRecord(static::ERROR, (string) $message, $context); } /** * Adds a log record at the CRITICAL level. * * @param array $context * @return void */ protected function writeLog($level, $message, $context): void { $this->logger->{$level}( $message = $this->formatMessage($message), $context = array_merge($this->context, $context) ); $this->fireLogEvent($level, $message, $context); * @param array $context * @return void */ public function error($message, array $context = []): void { $this->writeLog(__FUNCTION__, $message, $context); } /** * Log a warning message to the logs. * * @param array $context * @return void */ public function error($message, array $context = []): void { $this->driver()->error($message, $context); } /** * Exceptional occurrences that are not errors. * ); $context = $this->buildExceptionContext($e); method_exists($logger, $level) ? $logger->{$level}($e->getMessage(), $context) : $logger->log($level, $e->getMessage(), $context); } /** * Determine if the exception should be reported. public function handleException(Throwable $e) { self::$reservedMemory = null; try { $this->getExceptionHandler()->report($e); } catch (Exception $e) { $exceptionHandlerFailed = true; } if (static::$app->runningInConsole()) { * @return callable */ protected function forwardsTo($method) { return fn (...$arguments) => static::$app ? $this->{$method}(...$arguments) : false; } /** * Determine if the error level is a deprecation.|
UnexpectedValueException
|
|---|
UnexpectedValueException:
The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/nirmalpower/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: Attempt to read property "id" on null
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
Context: {"exception":{}}
at /var/www/nirmalpower/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:157
at Monolog\Handler\StreamHandler->write()
(/var/www/nirmalpower/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:48)
at Monolog\Handler\AbstractProcessingHandler->handle()
(/var/www/nirmalpower/vendor/monolog/monolog/src/Monolog/Logger.php:400)
at Monolog\Logger->addRecord()
(/var/www/nirmalpower/vendor/monolog/monolog/src/Monolog/Logger.php:651)
at Monolog\Logger->error()
(/var/www/nirmalpower/vendor/laravel/framework/src/Illuminate/Log/Logger.php:181)
at Illuminate\Log\Logger->writeLog()
(/var/www/nirmalpower/vendor/laravel/framework/src/Illuminate/Log/Logger.php:94)
at Illuminate\Log\Logger->error()
(/var/www/nirmalpower/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:645)
at Illuminate\Log\LogManager->error()
(/var/www/nirmalpower/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:274)
at Illuminate\Foundation\Exceptions\Handler->report()
(/var/www/nirmalpower/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:198)
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException()
(/var/www/nirmalpower/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:270)
at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
|