You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite changelog to be clearer and combine changes from all pre-releases.
This is the biggest slog release since v2.0.
See the changelog for highlights.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+54-40Lines changed: 54 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,62 +5,71 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
7
7
## [Unreleased]
8
-
***BIG**: Enables the `nested-values` feature by default.
9
-
* Bump MSRV to 1.61.
8
+
9
+
## [2.8.0] - 2025-10-05
10
+
This is the biggest slog release since 2.0. It fully preserves compatibility with prior releases.
11
+
12
+
### Highlights
13
+
- Enables the `nested-values` feature by default.
14
+
The next major release of `slog_json`, `slog_term`, etc should also enable this feature by default.
15
+
- Added `Logger::flush` and `Drain::flush` methods.
16
+
- Improved support for logging errors
17
+
- Have `#` log specifier transparently support `&` references to error
18
+
- Implement `slog::Value` for `Box<dyn std::error::Error>` and `anyhow::Error`
19
+
- Define a `prelude` module for common imports
20
+
- Upgraded to Rust 2018 and require Rust 1.61
21
+
- Deprecate the old `slog_log!` macros in favor of `slog::log!`
22
+
- Many internal improvements & bug fixes
23
+
24
+
### Changed
25
+
* Enables the `nested-values` feature by default.
26
+
* Updated to Rust 2018
27
+
* NOTE: Old 2015 crates will still work because of [excellent 2015/2018 compatibility](https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html#managing-compatibility)
28
+
* Bump MSRV to 1.61
29
+
- This is already required for `erased-serde`, `syn`, `serde_core`, and many other important crates in the rust ecosystem.
10
30
* Update `erased-serde` from v0.3 to v0.4
11
-
* Deprecate old prefixed macros like `slog_log`.
12
-
Rust 2018 macro paths make these unnecessary, use `slog::log!` instead.
31
+
* Depend on [`serde_core`] rather than `serde` to reduce compile times.
32
+
33
+
### Added
34
+
* Added a `Logger::flush` and `Drain::flush` methods
35
+
* Since this is a new method, not all drains implement it.
36
+
Calling it on an unsupported drain will give an error
37
+
* Define a `prelude` module for common imports.
38
+
Replace `use slog::{Serde, Logger, info, debug, trace}` with `use slog::prelude::*`
13
39
* Optionally implement Drain for [`parking_lot::Mutex`].
14
-
This is noticeably faster than `std::sync::Mutex` in the uncontented case, is smaller, and avoids poisoning.
40
+
This is noticeably faster than `std::sync::Mutex`, is smaller, and avoids poisoning.
15
41
* This feature has a separate name per version to allow supporting multiple versions of `parking_lot` at once. The current version (v0.12) has feature name `parking_lot_0_12`
16
-
* Define a `prelude` module for common imports, allowing import of logging macros (`info!`, `!debug`, ...) and `slog::Logger` in one go.
17
-
* Depend on [`serde_core`] rather than `serde` to reduce compile times.
42
+
* Implement slog::Value for `dyn std::error::Error` and `Box<dyn std::error:Error` (along with the `Send`/`Sync` versions).
43
+
* Optionally implement slog::Value for [`anyhow::Error`] (requires `anyhow` feature)
Rust 2018 macro paths like `slog::log!` make these unnecessary.
21
53
22
-
### 2.8.0-rc.1 - 2025-08-06
23
-
* Minimum Supported Rust Version is now [1.56](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0/).
24
-
This was already required if you wanted to use the `nested-values` feature.
54
+
### Fixed
55
+
* Fix logging of references to errors (resolved by introduction of `ErrorRef` in PR #327)
25
56
* Take advantage of the fact that in 1.81 [`std::error::Error`] has been moved to `core`.
26
57
On this rust version, slog now supports the error trait without requiring `std`.
27
58
* Add `#[must_use]` to most public types, including `slog::Logger`, `slog::OwnedKV`, and `slog::FnValue`.
28
-
* Try to give a descriptive error when the `nested-values` feature is unsupported.
29
-
* Implement slog::Value for `dyn std::error::Error` and `Box<dyn std::error:Error`,
30
-
along with the `Send`/`Sync` versions.
31
-
* Optionally implement slog::Value for [`anyhow::Error`].
32
-
Requires the `anyhow` feature to be enabled.
59
+
* Give a descriptive error when the `nested-values` feature is unsupported.
33
60
* Alias the `slog::Never` type to [`std::convert::Infallible`], fixing issue #209.
34
61
* doc: Fix typo in slog::Value docs (issue #335)
35
62
* Thank you to @larswirzenius for noticing this!
36
63
* doc: Fix "lazy continuation" in `slog::Logger` doc
37
64
* This mistake was caught by a new lint [`#[warn(clippy::doc_lazy_continuation)]`](https://rust-lang.github.io/rust-clippy/rust-1.81.0/index.html#/doc_lazy_continuation)
38
65
* Fix some internal warnings
39
66
* Example: Avoid the new [`#[warn(unexpected_cfgs)]`](https://blog.rust-lang.org/2024/05/06/check-cfg.html) lint.
40
-
* The crate almost passes clippy::pedantic now.
41
-
* None of these should affect user crates
67
+
* The crate almost passes clippy::pedantic now, except for a few very verbose lints like `clippy::must-use-candidate`
68
+
* None of these changes should affect user crates
42
69
* Stop requiring the `serde_derive` crate to implement the `nested-values` feature.
70
+
We depend on the new `serde_core` instead of even requiring `serde`.
43
71
* The `nested-values` feature no longer requires `serde/std` (was a mistake).
44
-
* nested-values: Fix CI failure caused by `#[deny(unused_extern_crates)]` lint
45
-
* Switch `#[deny(rust_2018_idioms)]` to `#[warn(...)]` to avoid unnecessary build failures in the future.
46
-
* I don't *think* this should affect user code.
47
72
* Always support 128-bit integers, even on the `wasm32-unknown-emscripten` target.
* The `#` error formatter in macros was updated to automatically select `ErrorValue` or `ErrorRef` (PR #328)
56
-
57
-
### 2.8.0-beta.1 - 2023-09-09
58
-
59
-
***BIG:** Updated to Rust 2018
60
-
* NOTE: Old 2015 crates will still work because of [excellent 2015/2018 compatibility](https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html#managing-compatibility)
61
-
* Minimum Supported Rust Version is now [1.49.0](https://blog.rust-lang.org/2020/12/31/Rust-1.49.0.html)
62
-
* Add `emit_bytes` method (PR #290)
63
-
* Control formatting using `BytesKind` enum
64
73
* Fix support for `feature="nothreads"`
65
74
* Internal refactoring to make different feature combos much easier (PR #301)
66
75
* Switch from Travis CI to Github Actions (fixes #294)
@@ -70,10 +79,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
70
79
* Make exception for `nested-values` feature on MSRV (1.49),
71
80
because `erased-serde` dependency requires `edition="2021"` (needs 1.56)
72
81
* Fix `#` format when not used as a last argument.
73
-
* Implement `Value` for `std::borrow::Cow`
74
-
* Fix duplicate `AsRef<str>` implementations, fixing support for `dynamic-keys`
82
+
* Fix duplicate `AsRef<str>` implementations when using `dynamic-keys` feature.
75
83
* Fix incorrect 'long' name for `slog::Level::Warning` (fixes issue #282)
0 commit comments