module

LogStreamTool

Stream logs from a Kubernetes pod to a file and open it in the specified editor.

This tool allows you to stream logs from a specific Kubernetes pod and save them to a file. It also opens the file in the specified editor with autoread enabled for real-time log monitoring.

Instance methods

open_in_editor(editor : String, file_path : String)

Open the log file in the specified editor.

@param editor [String] The name of the editor (vim, neovim, code, etc.). @param file_path [String] The path to the log file.

Source
run(args : Array(String))

Parse command-line options and execute the log streaming and editor logic.

Source
stream_pod_logs(pod_name : String, namespace : String, file_path : String)

Stream logs from the specified pod to a file.

@param pod_name [String] The name of the Kubernetes pod. @param namespace [String] The namespace of the pod. @param file_path [String] The path to the log file. Function to continuously stream logs from a specific pod

Source