For Go 语言结构化日志库, the strongest matches are rs/zerolog (Zerolog is a fast, zero-allocation structured logging library for), charmbracelet/log (charmbracelet/log is a Go structured logging library that outputs) and uber-go/zap (Zap is a production-grade structured logging library for Go). sirupsen/logrus and inconshreveable/log15 round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Go 语言高性能日志框架,支持输出 JSON 等机器可读格式,便于集中式日志分析。
Zerolog is a structured logging library for Go designed for high-performance event capture and observability. It focuses on generating machine-readable JSON output while minimizing memory overhead through zero-allocation buffer encoding and strongly-typed field validation. The library distinguishes itself by providing a chainable, context-aware interface that allows developers to bind trace identifiers and metadata directly to request lifecycles. It supports complex diagnostic workflows by enabling independent logger instances, custom output routing to multiple concurrent destinations, and ev
Zerolog is a fast, zero-allocation structured logging library for Go that produces JSON output, supports leveled logging, context fields, and flexible output routing — exactly what this search is after.
This is a structured logging library designed to produce logs using key-value pairs, severity levels, and machine-readable formats. It provides a toolkit for creating logs that are consistent for both human review and machine parsing. The project is distinguished by its focus on terminal visualization, using a styling system to apply colors and prefixes to log entries for improved readability in consoles. It also includes a specialized adapter to convert standard library log calls into structured events by inferring severity levels from message prefixes. The library manages metadata through
charmbracelet/log is a Go structured logging library that outputs JSON with severity levels and key-value context fields, includes a standard library adapter, and supports filtering and formatting, making it a strong fit for producing structured, leveled log entries.
Zap is a high-performance structured logging library designed for production environments. It provides a framework for generating machine-readable logs that minimize memory overhead and CPU usage, allowing for efficient event analysis and system monitoring. The library distinguishes itself through a focus on zero-allocation logging, utilizing buffer pooling to reduce garbage collection pressure during high-frequency operations. It enforces strict data typing through compile-time checks and structured field encoding, which ensures consistent output without the performance cost of reflection-ba
Zap is a production-grade structured logging library for Go that provides leveled logging, JSON output, typed context fields, hooks/middleware support, and multiple output targets, all with high performance and zero-allocation design — exactly the structured logging library this search targets.
Logrus is a structured logging library for Go that produces machine-readable output using key-value pairs and JSON formatting. It serves as a pluggable logging framework providing a thread-safe event logger with configurable mutex locking to manage concurrent writes across multiple goroutines. The project distinguishes itself through a pluggable hook system that routes log entries to external services or custom destinations. It also features a contextual logger capable of attaching persistent metadata and request-scoped fields to entries to improve traceability. The framework covers broad ob
Logrus is a structured logging library for Go that provides leveled logging, JSON output, context fields via a contextual logger, and a pluggable hook system for multiple output targets, making it a comprehensive fit for your requirements.
Structured, composable logging for Go
log15 is a structured, leveled logging library for Go that outputs JSON with rich context fields and offers composable handlers for multiple targets, closely matching the request for a high-performance, standard-library-compatible library.
apex/log is a Go logging library offering leveled logging and structured JSON output, making it a solid fit for producing structured log entries with context fields as requested.
Fastest structured logging
phuslu/log is a Go structured logging library focused on high performance and JSON output, making it a solid fit for producing leveled, structured log entries in Go.