Spec-Zone.ru › CakePHP 4.4

Интерфейс ErrorLoggerInterface

Интерфейс для обработчиков регистрации ошибок.

Используется ErrorHandlerMiddleware и глобальными обработчиками ошибок для регистрации исключений и ошибок.

Пространство имён: Cake\Error

Краткое описание методов

  • log() public устаревший

    Регистрировать ошибку для исключения с необязательным контекстом запроса.

  • logError() public @method
  • logException() public @method
  • logMessage() public устаревший

    Регистрировать сообщение об ошибке в логгер ошибок.

Подробное описание методов

log() public

log(Throwable $exception, Psr\Http\Message\ServerRequestInterface|null $request = null): bool

Log an error for an exception with optional request context.

Параметры

Throwable $exception

The exception to log a message for.

Psr\Http\Message\ServerRequestInterface|null $request необязательный

The current request if available.

Возвращаемые значения

bool

logError() public @method

logError(Cake\Error\PhpError $error, Psr\Http\Message\ServerRequestInterface $request = null, bool $includeTrace = false): void

Параметры

Cake\Error\PhpError $error
Psr\Http\Message\ServerRequestInterface $request необязательный
bool $includeTrace необязательный

Возвращаемые значения

void

logException() public @method

logException(Throwable $exception, Psr\Http\Message\ServerRequestInterface $request = null, bool $includeTrace = false): void

Параметры

Throwable $exception
Psr\Http\Message\ServerRequestInterface $request необязательный
bool $includeTrace необязательный

Возвращаемые значения

void

logMessage() public

logMessage(string|int $level, string $message, array $context = []): bool

Log a an error message to the error logger.

Параметры

string|int $level

The logging level

string $message

The message to be logged.

array $context необязательный

Context.

Возвращаемые значения

bool

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/interface-Cake.Error.ErrorLoggerInterface.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API