graflog
Structured JSON logging optimized for Grafana ingestion. And abstraction boring tracing subscriber syntax, by the way.
Features
- JSON-only structured logging
- Grafana-optimized field naming
- Thread-safe file appending
- Zero-configuration setup
- Consistent timestamp formatting
- Service and component tagging
- Distributed tracing with spans
Installation
Usage
use ;
Grafana Integration
Logs are formatted with consistent fields:
service: Service identifiercomponent: Component within servicetimestamp: RFC3339 formatted timestamplevel: Log level (trace, debug, info, warn, error)- Custom fields from your log statements
Perfect for Grafana Loki queries:
{service="payment-service"} | json | level="error"
{service="auth-service"} | json | component="jwt"
Command Line Usage
Pass log file path at startup:
No environment files needed - all parameters passed directly.