protected function logImpl($level, $message, array $context = array())
    {
        if (! $this->levelHasReached($level)) {
            return;
        }
        
        if ($this->isRotationNeeded()) {
            unlink($this->file);
        }
        
        $ms = $this->getMessage($level, $message, $context);
        
        $fos = new FileOutputStream($this->file, true);
        $fos->write($ms);
        $fos->flush();
        $fos->close();
    }