public function log($type, $text, $source='')
    {
        $log = new Logs();
        $log->setType($type);
        $log->setSource($source);
        $log->setContent($text);

        $this->em->persist($log);
        $this->em->flush();

        return $log;
    }
public function log($type, $text, $source='')
    {
        $log = new Logs();
        $log->setType($type);
        $log->setSource($source);
        $log->setContent($text);

        $this->em->persist($log);
        $this->em->flush();

        return $log;
    }
public function log ( $ type , $ text , $ source = '' ) { $ log = new Logs ( ) ; $ log -> setType ( $ type ) ; $ log -> setSource ( $ source ) ; $ log -> setContent ( $ text ) ; $ this -> em -> persist ( $ log ) ; $ this -> em -> flush ( ) ; return $ log ; }
Save a log in database

@param string $type
@param string $text
@return Logs
Save a log in database