etr  4.0-pre
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
etr.tools.logcapture.LogCapture Class Reference

Captures log messages into a memory buffer and allows on-demand writing captured messages to stderr. More...

Public Member Functions

def __init__ (self)
 
def start (self)
 Start capturing logs. More...
 
def clear (self)
 Clear captured logs. More...
 
def write_captured (self, message=None)
 Write captured logs since last clear() or start() More...
 

Public Attributes

 handler
 

Static Public Attributes

string logformat = "%(name)s: %(levelname)s: %(message)s"
 
 logdateformat = None
 
 stream = sys.stderr
 

Detailed Description

Captures log messages into a memory buffer and allows on-demand writing captured messages to stderr.

Constructor & Destructor Documentation

◆ __init__()

def etr.tools.logcapture.LogCapture.__init__ (   self)

Member Function Documentation

◆ clear()

def etr.tools.logcapture.LogCapture.clear (   self)

Clear captured logs.

◆ start()

def etr.tools.logcapture.LogCapture.start (   self)

Start capturing logs.

◆ write_captured()

def etr.tools.logcapture.LogCapture.write_captured (   self,
  message = None 
)

Write captured logs since last clear() or start()

Member Data Documentation

◆ handler

etr.tools.logcapture.LogCapture.handler

◆ logdateformat

etr.tools.logcapture.LogCapture.logdateformat = None
static

◆ logformat

string etr.tools.logcapture.LogCapture.logformat = "%(name)s: %(levelname)s: %(message)s"
static

◆ stream

etr.tools.logcapture.LogCapture.stream = sys.stderr
static

The documentation for this class was generated from the following file: