protected function flushLogQueue()
    {
        if ($this->logReady() && !empty($this->logQueue)) {
            foreach ($this->logQueue as $entry) {
                $this->getLog()->log($entry['message'], $entry['priority']);
            }
            $this->logQueue = [];
        }
    }