Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: LogInterceptor

Full name: Azera\Aop\LogInterceptor

Logs entry, exit, duration and failure of methods marked with Log.

In explicit (pipeline) calls there is no attribute, so the constructor defaults apply: defaultLevel (info) and logArgs (false).

Public methods

__construct() ·

public function __construct(Psr\Log\LoggerInterface $logger, string $defaultLevel = 'info', bool $logArgs = false): mixed

Parameters

Name Type Default Description
$logger Psr\Log\LoggerInterface -
$defaultLevel string 'info'
$logArgs bool false

Return value

  • Type: mixed

intercept() ·

public function intercept(Azera\Aop\Invocation $invocation, callable $next): mixed

Parameters

Name Type Default Description
$invocation Invocation -
$next callable -

Return value

  • Type: mixed

Back to the Index