def emit(self, record):
        """
        Emit a record.

        Determine the message ID, event category and event type. Then
        log the message in the NT event log.
        """
        if self._welu:
            try:
                id = self.getMessageID(record)
                cat = self.getEventCategory(record)
                type = self.getEventType(record)
                msg = self.format(record)
                self._welu.ReportEvent(self.appname, id, cat, type, [msg])
            except (__HOLE__, SystemExit):
                raise
            except:
                self.handleError(record)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/logging/handlers.py/NTEventLogHandler.emit