Structured Logging

When you log something, make it searchable and analyzable.

Created: by Pradeep Gowda Updated: Feb 09, 2024 Tagged: structured-logging · logging

Structured logging is a programming practice of implementing a consistent, predetermined message format for application logs that allows the logs to be treated as datasets, which makes them amenable to search, and analysis to gather insights about application behaviour and performance.

Most programming languages and frameworks have libraries that make it easy to do structured logging.

Common Structured Logging formats are JSON(line) and key=value separated by white-space.

Structured logging in Go with slog – interesting thing I learnt from this library - “nested keys”.

Tracing: structured logging, but better in every way | Andy Dote

logdyhq/logdy-core: Supercharge terminal logs with web browser UI and low-code. It’s like jq, tail, less, grep and awk merged together and available in a clean UI.