swot_simulator.logbook.LogFormatter#

class swot_simulator.logbook.LogFormatter(*args, **kwargs)[source]#

Bases: LogFormatter

Inserts the IP address of the worker or scheduler.

Parameters
  • *args – Base class arguments.

  • **kwarsg – Base class keyword arguments.

__init__(*args, **kwargs)[source]#
Parameters
  • color (bool) – Enables color support.

  • fmt (str) – Log message format. It will be applied to the attributes dict of log records. The text between %(color)s and %(end_color)s will be colored depending on the level if color support is on.

  • colors (dict) – color mappings from logging level to terminal color code

  • datefmt (str) – Datetime format. Used for formatting (asctime) placeholder in prefix_fmt.

Changed in version 3.2: Added fmt and datefmt arguments.

Methods

LogFormatter.converter

localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,

LogFormatter.format(record)

Do formatting for a record.

LogFormatter.formatException(ei)

Format and return the specified exception information as a string.

LogFormatter.formatMessage(record)

LogFormatter.formatStack(stack_info)

This method is provided as an extension point for specialized formatting of stack information.

LogFormatter.formatTime(record[, datefmt])

Return the creation time of the specified LogRecord as formatted text.

LogFormatter.usesTime()

Check if the format uses the creation time of the record.

Attributes