Skip to content

Commit

Permalink
Seek to begin since boot
Browse files Browse the repository at this point in the history
  • Loading branch information
kloenk committed Jul 20, 2022
1 parent 16f24bb commit fd9095a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ serde = { version = "1.0", features = [ "derive" ] }
getopts = "0.2"

log-writer = { version = "0.6", features = [ "serde" ] }
journald = { git = "https://github.com/nyantec/rust-journald", rev = "192fd851e79d8172c90ae21b2dceb51a08f1cfce" }
# journald = "0.7"
journald = { git = "https://github.com/nyantec/rust-journald.git", branch = "seek-since-boot" }
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn find_cursor<P: AsRef<Path>>(path: P, mut reader: JournalReader) -> Result<Jou
if !path.as_ref().exists() {
debug!("no cursor file, seeking to tail");
reader
.seek(JournalSeek::Tail)
.seek(JournalSeek::ThisBoot)
.context("Seeking to journald tail")?;
reader
.previous_entry()
Expand Down

0 comments on commit fd9095a

Please sign in to comment.