messages; } public function clear() { $this->messages = array(); } protected function write(LogRecord $record): void { $this->messages[] = $record['message']; } }