logging.handlers.NTEventLogHandler.getEventType()

getEventType(record) Returns the event type for the record. Override this if you want to specify your own types. This version does a mapping using the handler’s typemap attribute, which is set up in __init__() to a dictionary which contains mappings for DEBUG, INFO, WARNING, ERROR and CRITICAL. If you are using your own levels, you will either need to override this method or place a suitable dictionary in the handler’s typemap attribute.

logging.handlers.NTEventLogHandler.getEventCategory()

getEventCategory(record) Returns the event category for the record. Override this if you want to specify your own categories. This version returns 0.

logging.handlers.NTEventLogHandler.emit()

emit(record) Determines the message ID, event category and event type, and then logs the message in the NT event log.

logging.handlers.NTEventLogHandler.close()

close() At this point, you can remove the application name from the registry as a source of event log entries. However, if you do this, you will not be able to see the events as you intended in the Event Log Viewer - it needs to be able to access the registry to get the .dll name. The current version does not do this.

logging.handlers.NTEventLogHandler

class logging.handlers.NTEventLogHandler(appname, dllname=None, logtype='Application') Returns a new instance of the NTEventLogHandler class. The appname is used to define the application name as it appears in the event log. An appropriate registry entry is created using this name. The dllname should give the fully qualified pathname of a .dll or .exe which contains message definitions to hold in the log (if not specified, 'win32service.pyd' is used - this is installed with the Win32 extensi

logging.handlers.MemoryHandler.shouldFlush()

shouldFlush(record) Checks for buffer full or a record at the flushLevel or higher.

logging.handlers.MemoryHandler.setTarget()

setTarget(target) Sets the target handler for this handler.

logging.handlers.MemoryHandler.flush()

flush() For a MemoryHandler, flushing means just sending the buffered records to the target, if there is one. The buffer is also cleared when this happens. Override if you want different behavior.

logging.handlers.MemoryHandler.close()

close() Calls flush(), sets the target to None and clears the buffer.

logging.handlers.MemoryHandler

class logging.handlers.MemoryHandler(capacity, flushLevel=ERROR, target=None) Returns a new instance of the MemoryHandler class. The instance is initialized with a buffer size of capacity. If flushLevel is not specified, ERROR is used. If no target is specified, the target will need to be set using setTarget() before this handler does anything useful. close() Calls flush(), sets the target to None and clears the buffer. flush() For a MemoryHandler, flushing means just sending the bu