A lightweight, configurable, and extensible structured logging library for Go with multi-output support and advanced file handling.
slog is a lightweight, structured logging library written in Go. It provides configurable and extensible logging with support for multiple log levels, outputs, and advanced file operations like rotation and compression. It solves the need for a simple yet powerful logging solution that can adapt to various application requirements.
Go developers building applications that require flexible, performant logging with features like structured output, log rotation, and multi-destination support.
Developers choose slog for its balance of simplicity and extensibility, offering out-of-the-box functionality like file rotation and JSON formatting while allowing deep customization through handlers and formatters, all with competitive performance.
📑 Lightweight, configurable, extensible logging library written in Go. Support multi level, multi outputs and built-in multi file logger, buffers, clean, rotate-file handling.一个易于使用的,轻量级、可配置、可扩展的日志库。支持多个级别,输出到多文件;内置文件日志处理、自动切割、清理、压缩等增强功能
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes advanced file handling with automatic rotation by time and size, compression, and cleanup via the rotatefile subpackage, as detailed in the Advanced File Handling section.
Every component—logger, handler, formatter, processor—can be extended or replaced, allowing deep customization, emphasized in the Philosophy and custom logger examples.
Supports simultaneous logging to console, files, syslog, email, and custom io.Writer with configurable levels, shown in the handler package and examples like multi-destination setups.
Benchmarks show it outperforms logrus and is comparable to zap in allocations and speed, with detailed metrics provided in the Benchmarks section.
Advanced setups require verbose configuration, such as using Config structs or Builder with multiple options, which can be overwhelming for simple use cases compared to more streamlined libraries.
Has fewer third-party integrations and community plugins than established alternatives like zap or logrus, potentially increasing development effort for niche requirements.
Some features, like GORM integration, are referenced via GitHub issue links rather than comprehensive docs, indicating areas where users might need to hunt for solutions.