[features]
embed-pictrs = ["pict-rs"]
console = ["console-subscriber", "opentelemetry", "opentelemetry-otlp", "tracing-opentelemetry", "reqwest-tracing/opentelemetry_0_16"]
+json-log = ["tracing-subscriber/json"]
default = []
[workspace]
.trim_matches('"')
.parse::<Targets>()?;
- let format_layer = tracing_subscriber::fmt::layer().with_filter(targets.clone());
+ let format_layer = {
+ #[cfg(feature = "json-log")]
+ let layer = tracing_subscriber::fmt::layer().json();
+ #[cfg(not(feature = "json-log"))]
+ let layer = tracing_subscriber::fmt::layer();
+
+ layer.with_filter(targets.clone())
+ };
let subscriber = Registry::default()
.with(format_layer)