pub struct DlogutilEntry { /* private fields */ }Expand description
A struct containing the metadata and contents for a single dlog entry.
Implementations§
Source§impl DlogutilEntry
impl DlogutilEntry
Sourcepub fn get_timestamp(&self, stamp_type: SortingOrder) -> Result<Duration>
pub fn get_timestamp(&self, stamp_type: SortingOrder) -> Result<Duration>
Retrieves the timestamp of given type from the log entry.
The information about timestamp availability can be retrieved using the
buffer_check_ts_type_available function.
§Returns
Ok(Duration)- Timestamp of the entry as aDurationstruct.Err(std::io::Error)- An error.
§Errors
std::io::ErrorKind::InvalidInput- Invalid value of order.std::io::ErrorKind::InvalidInput- One of the pointers was NULL.std::io::ErrorKind::Uncategorized- The timestamp is missing.
Sourcepub fn get_tid(&self) -> Result<i32>
pub fn get_tid(&self) -> Result<i32>
Retrieves the TID (thread identificator) of the log sender.
If LogIdKmsg is used as the buffer, this function will always return
TIZEN_ERROR_NO_DATA.
This is because the KMSG buffer contains no TID information.
§Returns
Ok(i32)- TID of the log sender.Err(std::io::Error)- An error.
§Errors
std::io::ErrorKind::InvalidInput- One of the pointers was NULL.std::io::ErrorKind::Uncategorized- TID is missing or not applicable.
Sourcepub fn get_pid(&self) -> Result<i32>
pub fn get_pid(&self) -> Result<i32>
Retrieves the PID (process identificator) of the log sender.
If LogIdKmsg is used as the buffer, this function will always return
TIZEN_ERROR_NO_DATA.
This is because the KMSG buffer contains no PID information.
§Returns
Ok(i32)- PID of the log sender.Err(std::io::Error)- An error.
§Errors
std::io::ErrorKind::InvalidInput- One of the pointers was NULL.std::io::ErrorKind::Uncategorized- PID is missing or not applicable.
Sourcepub fn get_priority(&self) -> Result<Priority>
pub fn get_priority(&self) -> Result<Priority>
Retrieves the priority level metadata of the log entry.
§Returns
Ok(Priority)- Log priority.Err(std::io::Error)- An error.
§Errors
std::io::ErrorKind::InvalidInput- One of the pointers was NULL.std::io::ErrorKind::Uncategorized- The priority is missing.
Sourcepub fn get_tag(&self) -> Result<&str>
pub fn get_tag(&self) -> Result<&str>
Retrieves the tag (arbitrary label) of the log entry.
In some rare cases the entry may be malformed and the tag may turn out to be unavailable.
In such cases, an empty string may be returned instead.
§Returns
Ok(&str)- Log tag.Err(std::io::Error)- An error.
§Errors
std::io::ErrorKind::InvalidInput- One of the pointers was NULL.std::io::ErrorKind::Uncategorized- The tag is missing.
Sourcepub fn get_message(&self) -> Result<&str>
pub fn get_message(&self) -> Result<&str>
Retrieves the message (without any metadata) of the log entry.
In some rare cases the entry may be malformed and the message may turn out to be unavailable.
In such cases, an empty string may be returned instead.
§Returns
Ok(&str)- Log message.Err(std::io::Error)- An error.
§Errors
std::io::ErrorKind::InvalidInput- One of the pointers was NULL.std::io::ErrorKind::Uncategorized- The message is missing.