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 is initialized, send it to all handlers as long as the bubbling chain is not interrupted try { $handled = true; if (true === $handler->handle(clone $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(string|\Stringable $message, array $context = []): void { $this->addRecord(Level::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. if ($this->shouldntReport($e)) { return; } $this->reportThrowable($e); } /** * Reports error based on report method on exception or to logger. * * @param \Throwable $e * @return void */ protected function reportException(Throwable $e) { $this->app[ExceptionHandler::class]->report($e); } /** * Render the exception to a response. * try { $request->enableHttpMethodParameterOverride(); $response = $this->sendRequestThroughRouter($request); } catch (Throwable $e) { $this->reportException($e); $response = $this->renderException($request, $e); } $this->app['events']->dispatch($app = require_once __DIR__.'/../bootstrap/app.php';$kernel = $app->make(Kernel::class);$response = $kernel->handle( $request = Request::capture())->send();$kernel->terminate($request, $response);|
UnexpectedValueException
|
|---|
UnexpectedValueException:
The stream or file "D:\INETPUB\VHOSTS\hialindia.com\httpdocs\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 D:\INETPUB\VHOSTS\hialindia.com\httpdocs\bootstrap\cache directory must be present and writable.
Context: {"exception":{}}
at D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\monolog\monolog\src\Monolog\Handler\StreamHandler.php:137
at Monolog\Handler\StreamHandler->write(object(LogRecord))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\monolog\monolog\src\Monolog\Handler\AbstractProcessingHandler.php:44)
at Monolog\Handler\AbstractProcessingHandler->handle(object(LogRecord))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\monolog\monolog\src\Monolog\Logger.php:389)
at Monolog\Logger->addRecord(object(Level), 'The D:\\INETPUB\\VHOSTS\\hialindia.com\\httpdocs\\bootstrap\\cache directory must be present and writable.', array('exception' => object(Exception)))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\monolog\monolog\src\Monolog\Logger.php:644)
at Monolog\Logger->error('The D:\\INETPUB\\VHOSTS\\hialindia.com\\httpdocs\\bootstrap\\cache directory must be present and writable.', array('exception' => object(Exception)))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Log\Logger.php:184)
at Illuminate\Log\Logger->writeLog('error', 'The D:\\INETPUB\\VHOSTS\\hialindia.com\\httpdocs\\bootstrap\\cache directory must be present and writable.', array('exception' => object(Exception)))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Log\Logger.php:97)
at Illuminate\Log\Logger->error('The D:\\INETPUB\\VHOSTS\\hialindia.com\\httpdocs\\bootstrap\\cache directory must be present and writable.', array('exception' => object(Exception)))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Log\LogManager.php:665)
at Illuminate\Log\LogManager->error('The D:\\INETPUB\\VHOSTS\\hialindia.com\\httpdocs\\bootstrap\\cache directory must be present and writable.', array('exception' => object(Exception)))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php:317)
at Illuminate\Foundation\Exceptions\Handler->reportThrowable(object(Exception))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php:278)
at Illuminate\Foundation\Exceptions\Handler->report(object(Exception))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:497)
at Illuminate\Foundation\Http\Kernel->reportException(object(Exception))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:146)
at Illuminate\Foundation\Http\Kernel->handle(object(Request))
(D:\INETPUB\VHOSTS\hialindia.com\httpdocs\public\index.php:60)
|