{"repo":"rs/zerolog","free":true,"listed":false,"github":"https://github.com/rs/zerolog","clone":"git clone https://github.com/rs/zerolog.git","description":"Zero Allocation JSON Logger","language":"Go","stars":12488,"topics":["logging","json","golang","structured-logging","zerolog"],"license":"MIT","category":"analytics","readme_excerpt":"Zero Allocation JSON Logger The zerolog package provides a fast and simple logger dedicated to JSON output. Zerolog's API is designed to provide both a great developer experience and stunning performance. Its unique chaining API allows zerolog to write JSON (or CBOR) log events by avoiding allocations and reflection. Uber's zap library pioneered this approach. Zerolog is taking this concept to the next level with a simpler to use API and even better performance. To keep the code base and the API simple, zerolog focuses on efficient structured logging only. Pretty logging on the console is made possible using the provided (but inefficient) zerolog.ConsoleWriter . Who uses zerolog Find out who uses zerolog and add your company / project to the list. Features - Blazing fast - Low to zero allocation - Leveled logging - Sampling - Hooks - Contextual fields - context.Context integration - Integration with net/http - JSON and CBOR encoding formats - Pretty logging for development - Error Logging (with optional Stacktrace) - log/slog integration Installation Getting Started Simple Logging Example For simple logging, import the global logger package github.com/rs/zerolog/log Note: By default log writes to os.Stderr Note: The default log level for log.Print is trace Contextual Logging zerolog allows data to be added to log messages in the form of key:value pairs. The data added to the message adds \"context\" about the log event that can be critical for debugging as well as myriad other ","default_branch":null,"files":null,"tree":[],"storefront":"/r/rs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rs/zerolog/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."}