Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
* Implement `Drain::flush` method added in [slog-rs/slog#349]

[slog-rs/slog#349]: https://github.com/slog-rs/slog/pull/349

## 2.6.0 - 2022-02-20
### Changed
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ dynamic-keys = ["slog/dynamic-keys"]
default = []

[dependencies]
slog = { version = "2.1.1" }
slog = { git = "https://github.com/Techcable/slog.git", branch = "feature/simple-flush-method" }
serde_json = "1"
serde = "1"
erased-serde = {version = "0.3", optional = true }
time = { version = "0.3.6", features = ["formatting"] }

[dev-dependencies]
slog-async = "2"
slog-async = { git = "https://github.com/Techcable/slog-async.git", branch = "feature/impl-simple-flush" }

[package.metadata.docs.rs]
features = ["nested-values", "dynamic-keys"]
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ where
}
Ok(())
}

fn flush(&self) -> Result<(), slog::FlushError> {
let mut io = self.io.borrow_mut();
io.flush().map_err(slog::FlushError::from)
}
}

// }}}
Expand Down
Loading