CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 4.4 Strawberry API

  • Project:
    • CakePHP
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 4.4
      • 5.2
      • 5.1
      • 5.0
      • 4.6
      • 4.5
      • 4.4
      • 4.3
      • 4.2
      • 4.1
      • 4.0
      • 3.10
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Global
  • Cake
    • Auth
    • Cache
    • Collection
    • Command
    • Console
    • Controller
    • Core
    • Database
    • Datasource
    • Error
      • Debug
      • Middleware
      • Renderer
    • Event
    • Filesystem
    • Form
    • Http
    • I18n
    • Log
    • Mailer
    • Network
    • ORM
    • Routing
    • Shell
    • TestSuite
    • Utility
    • Validation
    • View

Interface ErrorLoggerInterface

Interface for error logging handlers.

Used by the ErrorHandlerMiddleware and global error handlers to log exceptions and errors.

Namespace: Cake\Error

Method Summary

  • log() public deprecated

    Log an error for an exception with optional request context.

  • logError() public @method
  • logException() public @method
  • logMessage() public deprecated

    Log a an error message to the error logger.

Method Detail

log() ¶ public

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

Log an error for an exception with optional request context.

Parameters
Throwable $exception

The exception to log a message for.

Psr\Http\Message\ServerRequestInterface|null $request optional

The current request if available.

Returns
bool

logError() ¶ public @method

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

logException() ¶ public @method

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

logMessage() ¶ public

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

Log a an error message to the error logger.

Parameters
string|int $level

The logging level

string $message

The message to be logged.

array $context optional

Context.

Returns
bool
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs