macro_rules! ray_json {
() => { ... };
($($value:expr),+ $(,)?) => { ... };
}Expand description
Log values as JSON using Serialize.
ray_json!() returns a handle, and ray_json!(value, ...) logs and returns
the handle for chaining.
ray!(json: value, ...) is an alias if you prefer to stay on ray!.
use ray::ray_json;
use serde::Serialize;
#[derive(Serialize)]
struct Event {
name: String,
}
ray_json!(Event {
name: "started".to_string(),
});