processRecord example

public function handleBatch(array $records): void
    {
        $messages = [];

        if (Logger::API >= 3) {
            /** @var LogRecord $record */
            foreach ($records as $record) {
                if ($record->level->isLowerThan($this->level)) {
                    continue;
                }
                $messages[] = $this->processRecord($record);
            }
        } else {
            foreach ($records as $record) {
                if ($record['level'] < $this->level) {
                    continue;
                }
                $messages[] = $this->processRecord($record);
            }
        }

        if ($messages) {
            
Home | Imprint | This part of the site doesn't use cookies.