MemoryLogHandler

Inheritance diagram of MemoryLogHandler
class MemoryLogHandler(capacity=1000)[source]

Bases: list, logging.handlers.BufferingHandler

An experimental log handler that stores temporary records in memory. When flushed it passes the records to another handler

close()[source]

Closes this handler

flush()[source]

Flushes this handler

shouldFlush(record)[source]

Determines if the given record should trigger the flush

Parameters:record (LogRecord) – a log record
Return type:bool
Returns:wheter or not the handler should be flushed