Emit a record. Determine the message ID, event category and event type. Then log the message in the NT event log.
(self, record)
| 1196 | return self.typemap.get(record.levelno, self.deftype) |
| 1197 | |
| 1198 | def emit(self, record): |
| 1199 | """ |
| 1200 | Emit a record. |
| 1201 | |
| 1202 | Determine the message ID, event category and event type. Then |
| 1203 | log the message in the NT event log. |
| 1204 | """ |
| 1205 | if self._welu: |
| 1206 | try: |
| 1207 | id = self.getMessageID(record) |
| 1208 | cat = self.getEventCategory(record) |
| 1209 | type = self.getEventType(record) |
| 1210 | msg = self.format(record) |
| 1211 | self._welu.ReportEvent(self.appname, id, cat, type, [msg]) |
| 1212 | except Exception: |
| 1213 | self.handleError(record) |
| 1214 | |
| 1215 | def close(self): |
| 1216 | """ |
nothing calls this directly
no test coverage detected