$this->write($record); return; } throw new \UnexpectedValueException('Writing to the log file failed: '.$error . Utils::getRecordMessageForException($record)); } $this->retrying = false; if ($this->useLocking) { flock($stream, LOCK_UN); $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:
Writing to the log file failed: Write of 6166 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6274 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6253 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6228 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6270 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6280 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6473 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6694 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6630 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 6570 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 7261 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 7248 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 7396 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: Writing to the log file failed: Write of 7080 bytes failed with errno=28 No space left on device
The exception occurred while attempting to log: file_put_contents(): Write of 201 bytes failed with errno=28 No space left on device
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 /www/wwwroot/name.com.vn/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:193
at Monolog\Handler\StreamHandler->write()
(/www/wwwroot/name.com.vn/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:48)
at Monolog\Handler\AbstractProcessingHandler->handle()
(/www/wwwroot/name.com.vn/vendor/monolog/monolog/src/Monolog/Logger.php:400)
at Monolog\Logger->addRecord()
(/www/wwwroot/name.com.vn/vendor/monolog/monolog/src/Monolog/Logger.php:651)
at Monolog\Logger->error()
(/www/wwwroot/name.com.vn/vendor/laravel/framework/src/Illuminate/Log/Logger.php:181)
at Illuminate\Log\Logger->writeLog()
(/www/wwwroot/name.com.vn/vendor/laravel/framework/src/Illuminate/Log/Logger.php:94)
at Illuminate\Log\Logger->error()
(/www/wwwroot/name.com.vn/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:645)
at Illuminate\Log\LogManager->error()
(/www/wwwroot/name.com.vn/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:274)
at Illuminate\Foundation\Exceptions\Handler->report()
(/www/wwwroot/name.com.vn/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:200)
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException()
(/www/wwwroot/name.com.vn/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:272)
at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
|