Skip to content

Commit da076b1

Browse files
committed
Upgrade to slog v2.8
Implement Drain::flush and enable the `nested-values` feature by default.
1 parent 48d1693 commit da076b1

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# Minimum Supported Rust Version
3131
#
3232
# This is hardcoded and needs to be in sync with Cargo.toml and the README
33-
- 1.53
33+
- 1.61
3434

3535
# Intermediate Releases (between MSRV and latest stable)
3636
# Be careful not to add these needlessly; they hold up CI

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
8+
### Changed
9+
* Upgrade to [slog v2.8.0].
10+
* Enable `nested-values` feature by default
11+
* Increase MSRV to 1.61 (same as slog)
12+
13+
### Added
14+
* Implement `Drain::flush` (new in [slog v2.8.0])
15+
16+
[slog v2.8.0]: https://github.com/slog-rs/slog/releases/v2.8.0
817

918
## 2.6.0 - 2022-02-20
1019
### Changed

Cargo.toml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,23 @@ readme = "README.md"
1515
# Please do not bump this unnecessarily.
1616
# Changing this should bump the minor version for semver (2.x for semver).
1717
#
18-
# The first version of Cargo that supports this field was in Rust 1.56.0.
19-
# In older releases, the field will be ignored, and Cargo will display a warning.
20-
rust-version = "1.53"
18+
# This currently matches the MSRV of slog
19+
rust-version = "1.61"
2120

2221
[features]
23-
nested-values = ["erased-serde", "slog/nested-values"]
22+
default = ["nested-values"]
23+
nested-values = ["dep:erased-serde", "slog/nested-values"]
2424
dynamic-keys = ["slog/dynamic-keys"]
25-
default = []
2625

2726
[dependencies]
28-
slog = { version = "2.1.1" }
27+
slog = "2.8"
2928
serde_json = "1"
3029
serde = "1"
31-
erased-serde = {version = "0.3", optional = true }
30+
erased-serde = { version = "0.4", optional = true }
3231
time = { version = "0.3.6", features = ["formatting"] }
3332

3433
[dev-dependencies]
3534
slog-async = "2"
3635

3736
[package.metadata.docs.rs]
38-
features = ["nested-values", "dynamic-keys"]
37+
features = ["dynamic-keys"]

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ where
251251
}
252252
Ok(())
253253
}
254+
255+
fn flush(&self) -> Result<(), slog::FlushError> {
256+
let mut io = self.io.borrow_mut();
257+
io.flush().map_err(slog::FlushError::from)
258+
}
254259
}
255260

256261
// }}}

0 commit comments

Comments
 (0)