Ultra-fast, production-ready logging library that delivers exceptional performance without compromising on features. Built for modern Go applications that demand both speed and observability.
Built from the ground up for performance-critical applications
Achieved through intelligent event pooling and buffer reuse. No garbage collection pressure in hot paths.
63ns/op for simple logs, 62ns for Float64, 60ns for new field types. 64% faster than Zerolog, 67% faster than Zap.
Rich, type-safe field support with JSON output. Perfect for modern observability stacks.
Automatic trace and span ID injection for distributed tracing and correlation.
JSON for production, colorized console for development. Extensible handler system.
Strongly typed field methods prevent runtime errors. Compile-time safety for production confidence.
Live benchmark data updated automatically from CI/CD
Library | Operation | ns/op | Allocations | Performance Advantage |
---|---|---|---|---|
Bolt v2.0.0 | Simple Log | 63 | 0 | 64% faster than Zerolog |
Zerolog | Disabled | 99.3 | 0 | - |
Zerolog | Enabled | 175.4 | 0 | - |
Zap | Enabled | 189.7 | 1 | - |
Logrus | Enabled | 2,847 | 23 | - |
Zero configuration required. Start logging with maximum performance immediately.
go get github.com/felixgeelhaar/bolt
package main
import (
"os"
"github.com/felixgeelhaar/bolt"
)
func main() {
logger := bolt.New(bolt.NewJSONHandler(os.Stdout))
logger.Info().
Str("service", "api").
Int("port", 8080).
Msg("Server starting")
}
// Context-aware logging with OpenTelemetry
contextLogger := logger.Ctx(ctx)
// Structured logging with rich types
logger.Info().
Str("user_id", "12345").
Bool("authenticated", true).
Float64("processing_time", 0.234).
Time("timestamp", time.Now()).
Any("metadata", map[string]interface{}{
"region": "us-east-1",
}).
Msg("Request processed")
Everything you need to master high-performance logging