def change_level(self, mid, hlevel, htype=LOG_TYPE_ALL):
        """Set the log level for a handler.

        Parameters
        ----------
        mid : str
            The module id of the logger
        hlevel : int
            The logging level.
        htype : int, optional
            The logging type of handler for which to change the
            log level. Default is LOG_TYPE_ALL.

        """
        handlers = self._loggers[mid].handlers
        if hlevel < self._loggers[mid].level:
            self._loggers[mid].level = hlevel

        for hdl in handlers:
            if htype == self.LOG_TYPE_ALL:
                hdl.level = hlevel
            elif htype == self.LOG_TYPE_FILE and isinstance(hdl, logging.FileHandler):
                hdl.level = hlevel
            elif htype == self.LOG_TYPE_STREAM and isinstance(hdl, logging.StreamHandler):
                hdl.level = hlevel