tracing-ndjson
A simple library for tracing in new-line delimited JSON format. This library is meant to be used with tracing as an alternative to the tracing_subscriber::fmt::json formatter.
Features
- Configurable field names for
target,message,level, andtimestamp. - Configurable timestamp formats such as RFC3339, UNIX timestamp, or any custom chrono format.
- Captures all span attributes and event fields in the root of the JSON object.
Usage
Add this to your Cargo.toml:
[]
= "0.1"
= "0.1"
use *;
Examples
See the examples directory for more examples.
License
Licensed under MIT license