Stdout Logger Interface

class larpix.logger.stdout_logger.StdoutLogger(filename=None, buffer_length=0, mode='wa')[source]

The StdoutLogger is logger class that acts as a test logger class. All objects are displayed according to their string representation and routed to stdout.

Parameters:
  • buffer_length – how many data messages to hang on to before flushing buffer to stdout
  • mode – how logger file should be opened (not implemented in StdoutLogger)
record(data, timestamp=None, *args, **kwargs)[source]

Send the specified data to stdout

Parameters:
  • data – list of data to be written to log
  • timestamp – unix timestamp to be associated with data
is_enabled()[source]

Check if logger is enabled

enable()[source]

Allow the logger to record data

disable()[source]

Stop the logger from recording data without closing

is_open()[source]

Check if logger is open

open(enable=True)[source]

Open logger if it is not already

Parameters:enableTrue if you want to enable the logger after opening
close()[source]

Close logger if it is not already

Note

This flushes any data in the buffer before closing

flush()[source]

Flushes any held data