Contracts

LoggerInterface

v1.0.0

Structured logging scoped to your module. Logs are stored in the Hub events table with full context.

Methods

public function info(string $event, array $context = []): void

Log an informational event.

public function warn(string $event, array $context = []): void

Log a warning event.

public function error(string $event, array $context = []): void

Log an error event.

Example

logger-interface.php
$this->logger->info('sync.started', [
    'source' => 'cron',
    'items'  => 42,
]);

$this->logger->error('sync.failed', [
    'error' => $e->getMessage(),
]);