esptest.logger.logger module

esptest.logger.logger.get_logger(suffix='')[source]

get a child logger from esptest, returning the parent logger if suffix is not given.

Parameters:

suffix (str)

Return type:

Logger

class esptest.logger.logger.MultiLineFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]

Bases: Formatter

indent for multiple lines

logging output:

[2025-06-10 13:05:17] INFO - This is a message
    Line 2
    Line 3
format(record)[source]

Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

Parameters:

record (LogRecord)

Return type:

str