Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: Log

Full name: Azera\Aop\Log

Marks a method for automatic logging.

The LogInterceptor logs method entry, exit, duration, and any exceptions. Useful for debugging and audit trails.

Example:

#[Advised]
class PaymentService
{
    #[Log(level: 'info')]
    public function processPayment(Payment $p): Result { ... }
}

Public Properties

  • public readonly string $level ·
  • public readonly bool $logArgs ·

Public methods

__construct() ·

public function __construct(string $level = 'info', bool $logArgs = false): mixed

Parameters

Name Type Default Description
$level string 'info'
$logArgs bool false

Return value

  • Type: mixed

Back to the Index