pub struct LogEvent {
pub log_id: Option<i32>,
pub pid: Option<i32>,
pub tid: Option<i32>,
pub uid: Option<i32>,
pub timestamp: Option<u64>,
pub tag: Option<String>,
pub prio: Option<i32>,
pub message: Option<String>,
pub args: Vec<Arg>,
}
Fields§
§log_id: Option<i32>
The log buffer (e.g. MAIN, SYSTEM, RADIO) the event comes from.
pid: Option<i32>
PID (TGID), TID and UID of the task that emitted the event.
tid: Option<i32>
§uid: Option<i32>
§timestamp: Option<u64>
Timestamp [ns]. The clock source is CLOCK_REALTIME, unlike many other Perfetto trace events that instead use CLOCK_BOOTTIME. The trace processor will take care of realigning clocks using the ClockSnapshot(s).
tag: Option<String>
When log_id == LID_EVENTS, |tag| corresponds to the event name defined in the second column of /system/etc/event-log-tags. For all other events, |tag| is the app-specified argument passed to __android_log_write().
prio: Option<i32>
Empty when log_id == LID_EVENTS.
message: Option<String>
Empty when log_id == LID_EVENTS.
args: Vec<Arg>
Only populated when log_id == LID_EVENTS.
Implementations§
Source§impl LogEvent
impl LogEvent
Sourcepub fn log_id(&self) -> AndroidLogId
pub fn log_id(&self) -> AndroidLogId
Returns the enum value of log_id
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_log_id(&mut self, value: AndroidLogId)
pub fn set_log_id(&mut self, value: AndroidLogId)
Sets log_id
to the provided enum value.
Sourcepub fn timestamp(&self) -> u64
pub fn timestamp(&self) -> u64
Returns the value of timestamp
, or the default value if timestamp
is unset.
Sourcepub fn prio(&self) -> AndroidLogPriority
pub fn prio(&self) -> AndroidLogPriority
Returns the enum value of prio
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_prio(&mut self, value: AndroidLogPriority)
pub fn set_prio(&mut self, value: AndroidLogPriority)
Sets prio
to the provided enum value.
Trait Implementations§
Source§impl Message for LogEvent
impl Message for LogEvent
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.