pi_portal.modules.mixins.read_log_file
Standard logging mixin class.
- class pi_portal.modules.mixins.read_log_file.LogFileReader[source]
Adds logging features to an existing class.
- tail(requested_lines)[source]
Read the specified number of lines from the end of a log file.
Lines that are not JSON formatted are dropped silently.
- Parameters:
requested_lines (
int) – The number of lines to read.- Return type:
List[Dict[Any,Any]]- Returns:
An array containing the lines read from the log file.