pub struct Journal { /* private fields */ }Implementations§
Source§impl Journal
impl Journal
Sourcepub async fn query(&self, filter: JournalFilter) -> Result<JournalResult>
pub async fn query(&self, filter: JournalFilter) -> Result<JournalResult>
Query journald logs using the configured backend.
Default backend: sdjournal (feature=journal-sdjournal).
Alternative backend: journalctl --output=json (feature=journal-cli).
The result is always bounded by filter.limit and filter.max_bytes. When limits are hit,
JournalResult.truncated is set to true.
Sourcepub async fn diagnose_unit_failure(
&self,
unit: &str,
opts: DiagnosisOptions,
) -> Result<Diagnosis>
pub async fn diagnose_unit_failure( &self, unit: &str, opts: DiagnosisOptions, ) -> Result<Diagnosis>
Convenience helper that fetches a status snapshot and a bounded log slice around “now”.
The default time window is now - 30s to now + 10s (see DiagnosisOptions::default).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Journal
impl !RefUnwindSafe for Journal
impl Send for Journal
impl Sync for Journal
impl Unpin for Journal
impl !UnwindSafe for Journal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more