logfile

Small persistent log that keeps only the most recent lines.

USB output during boot is usually lost because the host has not reconnected yet, so boot diagnostics go to flash as well.

Classes

LogFile

Log file on flash that keeps the last max_lines lines.

Module Contents

class logfile.LogFile(path, clock, max_lines=40, echo=print)

Log file on flash that keeps the last max_lines lines.

path
clock
max_lines = 40
echo
lines()

Return the stored lines, or an empty list if there is no log.