class documentation

class Log(log.Log):

Constructor: Log(mode, file_path, reset)

View In Hierarchy

Log class for Picoware.

Methods

  • log(self, message
    str, log_type: int = LOG_TYPE_NONE)
  • reset(self)
Method __init__ Initialize the log.
Method __setattr__ Set a log attribute, routing mode and file_path to setters.
Instance Variable - logs list (getter for stored logs)
Instance Variable - mode int (getter and setter for log mode)
def __init__(self, mode: int = LOG_MODE_REPL, file_path: str = 'picoware/log.txt', reset: bool = False):

Initialize the log.

Parameters
mode:intLog mode. Defaults to LOG_MODE_REPL.
file_path:strPath of the log file. Defaults to "picoware/log.txt".
reset:boolWhether to reset the log on start. Defaults to False.
def __setattr__(self, name, value):

Set a log attribute, routing mode and file_path to setters.

Parameters
name:strAttribute name to set.
value:objectNew value for the attribute.
- logs =

list (getter for stored logs)

- mode =

int (getter and setter for log mode)