def add_handler(self, mid, htype=LOG_TYPE_STREAM, hlevel=LOG_INFO, fmt=None, filename=None):
        """Add a handler to the logger.

        Parameters
        ----------
        mid : str
            The module id of the logger
        htype : int, optional
            The logging type to add to the handler. Default is LOG_TYPE_STREAM.
        hlevel : int, optional
            The logging level. Default is LOG_INFO.
        fmt : str, optional
            The format in which the information is presented.
            Default is "[%(levelname)-8s ] %(name)s: %(funcName)s: %(message)s"
        filename : str, optional
            The name of the file the file handler writes the logs to.
            Default is a generated filename.

        """
        if fmt is None:
            fmt = "[%(levelname)-8s ] %(name)s: %(funcName)s: %(message)s"
        formatter = logging.Formatter(fmt)

        if htype == self.LOG_TYPE_STREAM or htype == self.LOG_TYPE_ALL:
            handler = SilenceableStreamHandler()
            self._add_handler(mid, hlevel, handler, formatter)

        if htype == self.LOG_TYPE_FILE or htype == self.LOG_TYPE_ALL:
            if self._filename is None:
                if not os.path.exists("logs"):
                    os.makedirs("logs")
                dt = datetime.now().strftime("%Y-%m-%d %H-%M-%S")
                self._filename = "logs\logfile " + dt + ".log"
            filename = filename if filename is not None else self._filename

            handler = SilenceableFileHandler(filename)
            self._add_handler(mid, hlevel, handler, formatter)