Skip to main content

Module disk_logs

Module disk_logs 

Source
Expand description

On-disk log-file discovery and tailing shared by the agent and MCP logs commands.

Log files follow the <prefix>-<name>.log convention; lookup also accepts bare <name>.log paths and substring matches over the discovered set.

Functionsยง

display_names
Strips prefix and the .log suffix from each file name, yielding the bare service/agent names offered in interactive selection.
find_log_file
Resolves a log file for name: exact <name>.log, then <prefix><name>.log, then the first prefixed file containing name.
list_log_files
Lists .log files in logs_dir whose names start with prefix, sorted.
read_log_lines
Reads the last lines lines of log_file that satisfy filter.