protected function writeLog($level, $message, $context)
    {
        if (!$this->handle) {
            $this->handle = fopen($this->getFile(), 'a');
        }
        $content = $this->formatLog($level, $message, $context);
        return (bool)fwrite($this->handle, $content);
    }