public function sendLogsTo(LogConsumer $logConsumer)
    {
        if ($logConsumer === $this) {
            throw new LogicException('Operation not allowed');
        }
        
        while (!empty($this->collectedLogs)) {
            $log = array_shift($this->collectedLogs);
            $logConsumer->consumeLog($log['message'], $log['context']);
        }
    }