Interface for error logging handlers.
Used by the ErrorHandlerMiddleware and global error handlers to log exceptions and errors.
Log an error for an exception with optional request context.
Log a an error message to the error logger.
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 optional The current request if available.
bool
logError(Cake\Error\PhpError $error, Psr\Http\Message\ServerRequestInterface $request = null, bool $includeTrace = false): void
Cake\Error\PhpError
$error Psr\Http\Message\ServerRequestInterface
$request optional bool
$includeTrace optional void
logException(Throwable $exception, Psr\Http\Message\ServerRequestInterface $request = null, bool $includeTrace = false): void
Throwable
$exception Psr\Http\Message\ServerRequestInterface
$request optional bool
$includeTrace optional void
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 optional 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