public function log($message, $priority = null)
    {
        if ($this->logReady()) {
            $this->flushLogQueue();
            return $this->getLog()->log($message, $priority);
        } else {
            $this->queueLog($message, $priority);
        }
    }