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 "C:\inetpub\vhosts\aym.com.tr\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 stream or file "C:\inetpub\vhosts\aym.com.tr\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 stream or file "C:\inetpub\vhosts\aym.com.tr\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 stream or file "C:\inetpub\vhosts\aym.com.tr\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 stream or file "C:\inetpub\vhosts\aym.com.tr\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 stream or file "C:\inetpub\vhosts\aym.com.tr\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 stream or file "C:\inetpub\vhosts\aym.com.tr\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: file_put_contents(C:\inetpub\vhosts\aym.com.tr\httpdocs\storage\framework\views/e5be39d20efb440ff5c8be444282c191.php): Failed to open stream: Permission denied Context: {"exception":{}} Context: {"exception":{}} Context: {"exception":{}} Context: {"exception":{}} Context: {"exception":{}} Context: {"exception":{}} Context: {"exception":{}} at C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\monolog\monolog\src\Monolog\Handler\StreamHandler.php:137 at Monolog\Handler\StreamHandler->write() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\monolog\monolog\src\Monolog\Handler\AbstractProcessingHandler.php:44) at Monolog\Handler\AbstractProcessingHandler->handle() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\monolog\monolog\src\Monolog\Logger.php:389) at Monolog\Logger->addRecord() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\monolog\monolog\src\Monolog\Logger.php:644) at Monolog\Logger->error() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Log\Logger.php:184) at Illuminate\Log\Logger->writeLog() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Log\Logger.php:97) at Illuminate\Log\Logger->error() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Log\LogManager.php:681) at Illuminate\Log\LogManager->error() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php:317) at Illuminate\Foundation\Exceptions\Handler->reportThrowable() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php:278) at Illuminate\Foundation\Exceptions\Handler->report() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:497) at Illuminate\Foundation\Http\Kernel->reportException() (C:\inetpub\vhosts\aym.com.tr\httpdocs\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:146) at Illuminate\Foundation\Http\Kernel->handle() (C:\inetpub\vhosts\aym.com.tr\httpdocs\public\index.php:51) |