graflog
Structured JSON logging for Rust applications optimized for Grafana ingestion.
Features
- JSON-only structured logging
- Grafana-optimized field naming
- Thread-safe file appending
- Zero-configuration setup
- Consistent timestamp formatting
- Service and component tagging
Installation
[]
= "0.1"
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"
Command Line Usage
Pass log file path at startup:
No environment files needed - all parameters passed directly.