{"repo":"michurin/human-readable-json-logging","free":true,"listed":false,"github":"https://github.com/michurin/human-readable-json-logging","clone":"git clone https://github.com/michurin/human-readable-json-logging.git","description":"The tool to pretty print JSON log stream right from running process in human readable format","language":"Go","stars":24,"topics":["go","golang","human-readable","logging","slog","tooling","elk","structured-logging"],"license":"MIT","category":"cli-tools","readme_excerpt":"human-readable-json-logging (pplog) It is library and binary CLI tool to make JSON logs readable including colorizing. The formatting is based on standard goland templating engine text/template. The CLI tool obtains templates from environment or configuration file. See examples below. You can find examples of using the library in documentation. Long story short, you are to direct output of your JSON logger (including modern slog) to magic reader and readable loglines shows up. Install and use Running in subprocess mode: Running in pipe mode: Real life example One of my configuration file: My original logs look like this: It turns to: One more example: settings for gRPC+slog out of the box logging Basic settings for github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging logs. Step by step customization First things first, I recommend you to prepare small file with your logs. Let's name it example.log . Now you can start to play with it by command like that: You will see some formatted logs. Now create your first pplog.env . You can start from this universal one: You will see all your logs in KEY=VALUE format. Now look over all your keys and choose one you want to see in the first place. Say, message . Modify your pplog.env this way: You will see message in the first place and remove it from KEY=VALUE tail. Now, you are free to add colors: We makes message green. Keep shaping your logs field by field. Template functions - All Masterminds/sprig/v3 functions - trimS","default_branch":null,"files":null,"tree":[],"storefront":"/r/michurin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/michurin/human-readable-json-logging/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}