pub fn write_event_buffer_now<T: Into<EventValue>>(
log_buffer: Buffer,
tag: EventTag,
value: T,
) -> Result<(), Error>Expand description
Writes an event with the current timestamp to a specific buffer.
This is a convenience function that creates an event with the current system time and writes it to the specified buffer.
§Parameters
log_buffer: The target log buffertag: The event tag identifiervalue: The event value (can be any type that converts toEventValue)
§Errors
Returns an error if the event data exceeds the maximum size.
§Examples
use android_logd_logger::{write_event_buffer_now, Buffer, Error, Event, EventValue};
android_logd_logger::builder().init();
write_event_buffer_now(Buffer::Stats, 1, "test").unwrap();
let value: Vec<EventValue> = vec![1.into(), "one".into(), 123.3.into()].into();
write_event_buffer_now(Buffer::Stats, 2, value).unwrap();