Version AUR CICD pre-commit

snazy - a snazzy json log viewer

Snazy is a simple tool to parse json logs and output them in a nice format with nice colors.

As a tekton developer who has to dig into controller/webhook logs I wanted something that is a bit easier to look in the eyes and identify error/info/warning statements easily.

You do not have to use it only with tekton but work well with projects that uses go-uber/zap library like knative and many others.

Screenshot

screenshot

Installation

Binaries

Go to the release page and grab the archive or package targeting your platform.

Arch

With your favourite aurhelper for example yay :

shell yay -S snazy-bin

Nix/NixOS

This repository includes a flake (see NixOS Wiki on Flakes).

If you have the nix flake command enabled (currenty on nixos-unstable, nixos-version >= 22.05)

shell nix run github:chmouel/snazy -- --help # your args are here

You can also use it to test and develop the source code:

shell nix develop # drops you in a shell with all the thing needed nix flake check # runs cargo test, rustfmt, …

Homebrew

shell brew tap chmouel/snazy https://github.com/chmouel/snazy brew install snazy

Crates.io

shell cargo install snazy

Docker

shell kubectl logs deployment/pod foo|docker run -i ghcr.io/chmouel/gosmee

Build from source

Snazy is build with rust, if you want to compile it directly you just need to grab the source and run cargo build.

Usage

shell kubectl logs deployment/controller|snazy

screenshot

shell % kubectl log pod|snazy -f warning -f error

snazy level symbols

Shell completions

Shell completions are available for most shells in the misc/completions and it will be automatically installed with the aur/brew package.

FAQ

Copyright

Apache-2.0

Authors

Chmouel Boudjnah <@chmouel>