Module pueue_lib::log[][src]

Expand description

Helper classes to read and write log files of Pueue’s tasks.

Functions

clean_log_handles

Remove the the log files of a task.

create_log_file_handles

Create and return the file handle for the (stdout, stderr) log files of a task.

get_log_file_handles

Return the file handle for the (stdout, stderr) log files of a task.

get_log_paths

Return the paths to the (stdout, stderr) log files of a task.

read_and_compress_log_files

Return the (stdout, stderr) output of a task.
Task output is compressed using snap to save some memory and bandwidth.

read_last_lines

Read the last amount lines of a file to a string.

read_last_log_file_lines

Return the last lines of (stdout, stderr) of a task.
This output is uncompressed and may take a lot of memory, which is why we only read the last few lines.

reset_task_log_directory

Remove all files in the log directory.