pub fn log(
timestamp: SystemTime,
buffer_id: Buffer,
priority: Priority,
pid: u16,
thread_id: u16,
tag: &str,
message: &str,
) -> Result<(), Error>Expand description
Construct and send a log entry (non-Android platforms).
This function allows you to create custom log entries with explicit control over all parameters. On non-Android platforms, it prints to stderr in logcat format.
§Parameters
timestamp: The timestamp for the log entrybuffer_id: The target log bufferpriority: The log priority levelpid: Process ID to associate with the logthread_id: Thread ID to associate with the logtag: The log tag stringmessage: The log message content
§Errors
Returns an error if the log entry cannot be formatted or written.
§Example
android_logd_logger::log(SystemTime::now(), Buffer::Main, Priority::Info, 0, 0, "tag", "message").unwrap();