Contracts
LoggerInterface
v1.0.0Structured logging scoped to your module. Logs are stored in the Hub events table with full context.
Methods
public function info(string $event, array $context = []): voidLog an informational event.
public function warn(string $event, array $context = []): voidLog a warning event.
public function error(string $event, array $context = []): voidLog an error event.
Example
logger-interface.php
$this->logger->info('sync.started', [
'source' => 'cron',
'items' => 42,
]);
$this->logger->error('sync.failed', [
'error' => $e->getMessage(),
]);