LogViewer is a Terminal User Interface (TUI) application designed to facilitate the viewing of logs from Kubernetes or Docker containers. It provides an interactive and real-time experience for managing and troubleshooting your containerized applications.
- Interactive List Navigation: Seamlessly browse Kubernetes namespaces, workloads, pods, and containers using keyboard controls.
- Real-time Logs Viewing: Effortlessly stream logs from selected Docker or Kubernetes containers.
- Customizable Display: Use a TOML configuration file to filter and customize the namespaces and logs you wish to view.
For a quick and easy installation, you can use the following script. This script detects your OS, downloads the correct LogViewer binary, and places it in your system's binary path:
curl -s https://raw.githubusercontent.com/filipecaixeta/logviewer/master/install.sh | bash
To install LogViewer using Go, ensure you have Go installed on your system and then run the following command:
go install github.com/filipecaixeta/logviewer/cmd/logviewer@latest
After installation, you can start using LogViewer by simply typing logviewer
in your terminal. LogViewer offers several subcommands for interacting with different environments:
# Interact with Kubernetes clusters
logviewer k8s
# Interact with Docker containers
logviewer docker
# Read from standard input (experimental)
logviewer stdin
LogViewer determines which configuration file to use following this order:
- A file specified by the
LOGVIEWER_CONFIG
environment variable. - A
config.toml
file in the current working directory. - A
~/.config/logviewer/config.toml
file in the user's home directory.
You can also explicitly specify a configuration file using the --config
flag:
logviewer --config path/to/your/config.toml
A template can be found at config.template.toml within the repository.
The configuration options allow you to set themes, specify namespaces, and define filters and transforms for your log data.
Here's a quick look at LogViewer in action:
Contributions to LogViewer are welcome! Please refer to the repository's issues page to report bugs or suggest features.
LogViewer is open-sourced software licensed under the MIT License.