MemoryLogHandler

digraph inheritanced97832544a { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "BufferingHandler" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="A handler class which buffers logging records in memory. Whenever each"]; "Handler" -> "BufferingHandler" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Filterer" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="A base class for loggers and handlers which allows them to share"]; "Handler" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="Handler instances dispatch logging events to specific destinations."]; "Filterer" -> "Handler" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MemoryLogHandler" [URL="#taurus.core.util.log.MemoryLogHandler",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="An experimental log handler that stores temporary records in memory."]; "BufferingHandler" -> "MemoryLogHandler" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class MemoryLogHandler(capacity=1000)[source]

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

Import from taurus.core.util.log as:

from taurus.core.util.log import MemoryLogHandler
close()[source]

Closes this handler

flush()[source]

Flushes this handler

shouldFlush(record)[source]

Determines if the given record should trigger the flush

Parameters:

record (logging.LogRecord) – a log record

Returns:

wheter or not the handler should be flushed

Return type:

bool