datalogd.plugins.logging_datasink module

class datalogd.plugins.logging_datasink.LoggingDataSink(level=20, header='Data received:', indent=' ')[source]

Bases: datalogd.DataSink

Output data using python’s logging system.

Each item of data is output in a separate line, and the formatting can be controlled using the header and indent parameters.

Parameters:
  • level – The logging level to use for the output.
  • header – Line of header text preceeding the logged data.
  • indent – Prefix applied to each line of logged data.
receive(data)[source]

Accept the provided data and output it using python’s logging system.

Parameters:data – Data to log.