def emit(self, record):

        information = get_request_information()

        result = record.msg

        if type(result) == dict:

            information.update({
                "event": result["name"],
                "time": datetime.now()
            })

            information["pass"] = True
            information["action"] = {}

            if "exception" in result:

                information["action"]["exception"] = result["exception"]
                information["pass"] = False

            elif result["name"] in self.action_parsers:
                action_parser = self.action_parsers[result["name"]]

                result["kwargs"]["result"] = result["result"]
                action_result = action_parser(*result["args"], **result["kwargs"])

                information["action"].update(action_result)

            api.common.get_conn().statistics.insert(information)
Store record into the db.
dataset/ETHPy150Open IceCTF/ctf-platform/api/api/logger.py/StatsHandler.emit