<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_exc(self, message, exc=None, critical=True, raise_type=None):
 """ Log exception, and possibly raise exception. :param string message: the message to log :param Exception exc: the original exception :param bool critical: if ``True``, log as :data:`aeneas.logger.Logger.CRITICAL`; otherwise as :data:`aeneas.logger.Logger.WARNING` :param Exception raise_type: if not ``None``, raise this Exception type """

        log_function = self.log_crit if critical else self.log_warn
        log_function(message)
        if exc is not None:
            log_function([u"%s", exc])
        if raise_type is not None:
            raise_message = message
            if exc is not None:
                raise_message = u"%s : %s" % (message, exc)
            raise raise_type(raise_message)