public function logEvent($userId = null, $title = null, $args = null, $classId = null) {
        if (!filter_var($userId, FILTER_VALIDATE_INT)) {
            throw new Exception("Cannot log event, no User ID given"); 
        }