Function vector_common::encode_logfmt::encode_value

pub fn encode_value(input: &Value) -> Result<String, EncodingError>
Expand description

Serialize the input value into a logfmt string. If the value is not an object, it is treated as the value of an object where the key is “message”.

§Errors

Returns an EncodingError if any of the keys are not strings.