1# Change Log 2 3## [Unreleased] 4 5## [0.4.26] - 2025-02-18 6 7## What's Changed 8* Derive `Clone` for `kv::Value` by @SpriteOvO in https://github.com/rust-lang/log/pull/668 9* Add `spdlog-rs` link to crate doc by @SpriteOvO in https://github.com/rust-lang/log/pull/669 10 11 12**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.25...0.4.26 13 14## [0.4.25] - 2025-01-14 15 16## What's Changed 17* Revert loosening of kv cargo features by @KodrAus in https://github.com/rust-lang/log/pull/662 18 19 20**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.24...0.4.25 21 22## [0.4.24] - 2025-01-11 23 24## What's Changed 25* Fix up kv feature activation by @KodrAus in https://github.com/rust-lang/log/pull/659 26 27 28**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.23...0.4.24 29 30## [0.4.23] - 2025-01-10 (yanked) 31 32## What's Changed 33* Fix some typos by @Kleinmarb in https://github.com/rust-lang/log/pull/637 34* Add logforth to implementation by @tisonkun in https://github.com/rust-lang/log/pull/638 35* Add `spdlog-rs` link to README by @SpriteOvO in https://github.com/rust-lang/log/pull/639 36* Add correct lifetime to kv::Value::to_borrowed_str by @stevenroose in https://github.com/rust-lang/log/pull/643 37* docs: Add logforth as an impl by @tisonkun in https://github.com/rust-lang/log/pull/642 38* Add clang_log implementation by @DDAN-17 in https://github.com/rust-lang/log/pull/646 39* Bind lifetimes of &str returned from Key by the lifetime of 'k rather than the lifetime of the Key struct by @gbbosak in https://github.com/rust-lang/log/pull/648 40* Fix up key lifetimes and add method to try get a borrowed key by @KodrAus in https://github.com/rust-lang/log/pull/653 41* Add Ftail implementation by @tjardoo in https://github.com/rust-lang/log/pull/652 42 43## New Contributors 44* @Kleinmarb made their first contribution in https://github.com/rust-lang/log/pull/637 45* @tisonkun made their first contribution in https://github.com/rust-lang/log/pull/638 46* @SpriteOvO made their first contribution in https://github.com/rust-lang/log/pull/639 47* @stevenroose made their first contribution in https://github.com/rust-lang/log/pull/643 48* @DDAN-17 made their first contribution in https://github.com/rust-lang/log/pull/646 49* @gbbosak made their first contribution in https://github.com/rust-lang/log/pull/648 50* @tjardoo made their first contribution in https://github.com/rust-lang/log/pull/652 51 52**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.22...0.4.23 53 54## [0.4.22] - 2024-06-27 55 56## What's Changed 57* Add some clarifications to the library docs by @KodrAus in https://github.com/rust-lang/log/pull/620 58* Add links to `colog` crate by @chrivers in https://github.com/rust-lang/log/pull/621 59* adding line_number test + updating some testing infrastructure by @DIvkov575 in https://github.com/rust-lang/log/pull/619 60* Clarify the actual set of functions that can race in _racy variants by @KodrAus in https://github.com/rust-lang/log/pull/623 61* Replace deprecated std::sync::atomic::spin_loop_hint() by @Catamantaloedis in https://github.com/rust-lang/log/pull/625 62* Check usage of max_level features by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/627 63* Remove unneeded import by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/628 64* Loosen orderings for logger initialization in https://github.com/rust-lang/log/pull/632. Originally by @pwoolcoc in https://github.com/rust-lang/log/pull/599 65* Use Location::caller() for file and line info in https://github.com/rust-lang/log/pull/633. Originally by @Cassy343 in https://github.com/rust-lang/log/pull/520 66 67## New Contributors 68* @chrivers made their first contribution in https://github.com/rust-lang/log/pull/621 69* @DIvkov575 made their first contribution in https://github.com/rust-lang/log/pull/619 70* @Catamantaloedis made their first contribution in https://github.com/rust-lang/log/pull/625 71 72**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.21...0.4.22 73 74## [0.4.21] - 2024-02-27 75 76## What's Changed 77* Minor clippy nits by @nyurik in https://github.com/rust-lang/log/pull/578 78* Simplify Display impl by @nyurik in https://github.com/rust-lang/log/pull/579 79* Set all crates to 2021 edition by @nyurik in https://github.com/rust-lang/log/pull/580 80* Various changes based on review by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/583 81* Fix typo in file_static() method doc by @dimo414 in https://github.com/rust-lang/log/pull/590 82* Specialize empty key value pairs by @EFanZh in https://github.com/rust-lang/log/pull/576 83* Fix incorrect lifetime in Value::to_str() by @peterjoel in https://github.com/rust-lang/log/pull/587 84* Remove some API of the key-value feature by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/585 85* Add logcontrol-log and log-reload by @swsnr in https://github.com/rust-lang/log/pull/595 86* Add Serialization section to kv::Value docs by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/593 87* Rename Value::to_str to to_cow_str by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/592 88* Clarify documentation and simplify initialization of `STATIC_MAX_LEVEL` by @ptosi in https://github.com/rust-lang/log/pull/594 89* Update docs to 2021 edition, test by @nyurik in https://github.com/rust-lang/log/pull/577 90* Add "alterable_logger" link to README.md by @brummer-simon in https://github.com/rust-lang/log/pull/589 91* Normalize line ending by @EFanZh in https://github.com/rust-lang/log/pull/602 92* Remove `ok_or` in favor of `Option::ok_or` by @AngelicosPhosphoros in https://github.com/rust-lang/log/pull/607 93* Use `Acquire` ordering for initialization check by @AngelicosPhosphoros in https://github.com/rust-lang/log/pull/610 94* Get structured logging API ready for stabilization by @KodrAus in https://github.com/rust-lang/log/pull/613 95 96## New Contributors 97* @nyurik made their first contribution in https://github.com/rust-lang/log/pull/578 98* @dimo414 made their first contribution in https://github.com/rust-lang/log/pull/590 99* @peterjoel made their first contribution in https://github.com/rust-lang/log/pull/587 100* @ptosi made their first contribution in https://github.com/rust-lang/log/pull/594 101* @brummer-simon made their first contribution in https://github.com/rust-lang/log/pull/589 102* @AngelicosPhosphoros made their first contribution in https://github.com/rust-lang/log/pull/607 103 104## [0.4.20] - 2023-07-11 105 106* Remove rustversion dev-dependency by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/568 107* Remove `local_inner_macros` usage by @EFanZh in https://github.com/rust-lang/log/pull/570 108 109## [0.4.19] - 2023-06-10 110 111* Use target_has_atomic instead of the old atomic_cas cfg by @GuillaumeGomez in https://github.com/rust-lang/log/pull/555 112* Put MSRV into Cargo.toml by @est31 in https://github.com/rust-lang/log/pull/557 113 114## [0.4.18] - 2023-05-28 115 116* fix Markdown links (again) by @hellow554 in https://github.com/rust-lang/log/pull/513 117* add cargo doc to workflow by @hellow554 in https://github.com/rust-lang/log/pull/515 118* Apply Clippy lints by @hellow554 in https://github.com/rust-lang/log/pull/516 119* Replace ad-hoc eq_ignore_ascii_case with slice::eq_ignore_ascii_case by @glandium in https://github.com/rust-lang/log/pull/519 120* fix up windows targets by @KodrAus in https://github.com/rust-lang/log/pull/528 121* typo fix by @jiangying000 in https://github.com/rust-lang/log/pull/529 122* Remove dependency on cfg_if by @EriKWDev in https://github.com/rust-lang/log/pull/536 123* GitHub Workflows security hardening by @sashashura in https://github.com/rust-lang/log/pull/538 124* Fix build status badge by @atouchet in https://github.com/rust-lang/log/pull/539 125* Add call_logger to the documentation by @a1ecbr0wn in https://github.com/rust-lang/log/pull/547 126* Use stable internals for key-value API by @KodrAus in https://github.com/rust-lang/log/pull/550 127* Change wording of list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/553 128* Add std-logger to list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/554 129* Add `set_max_level_racy` and gate `set_max_level` by @djkoloski in https://github.com/rust-lang/log/pull/544 130* [doc] src/lib.rs : prefix an unused variable with an underscore by @OccupyMars2025 in https://github.com/rust-lang/log/pull/561 131* [doc] src/macros.rs : correct grammar errors of an example in lib documentation by @OccupyMars2025 in https://github.com/rust-lang/log/pull/562 132 133## [0.4.17] - 2022-04-29 134 135* Update `kv_unstable` internal dependencies. 136 137## [0.4.16] - 2022-03-22 138 139* Fix a conflict with unqualified `Option` use in macros. 140 141## [0.4.15] - 2022-02-23 142 143* Silence a warning about the deprecated `spin_loop_hint`. 144* Relax ordering in the atomic `set_max_level` call. 145* Add thumbv4t-none-eabi to targets that don't support atomics 146* Allow levels to be iterated over. 147* Implement `Log` on some common wrapper types. 148* Improvements to test coverage. 149* Improvements to documentation. 150* Add key-value support to the `log!` macros. 151* Tighten `kv_unstable` internal dependencies, so they don't bump past their current alpha. 152* Add a simple visit API to `kv_unstable`. 153* Support `NonZero*` integers as values in structured logging 154* Support static strings as keys in structured logging 155 156## [0.4.14] - 2021-01-27 157 158* Remove the `__private_api_log_lit` special case. 159* Fixed incorrect combination of `kv_unstable` and `std` features causing compile failures. 160* Remove unstable `Value::to_*` conversions that were incorrectly using `as`. 161* Rename unstable `Value::to_error` to `Value::to_borrowed_error`. 162 163## [0.4.13] - 2021-01-11 164 165* This is the same as `0.4.11`, except with a `kv_unstable_std` feature added to aid migrating current dependents to `0.4.14` (which was originally going to be `0.4.13` until it was decided to create a patch from `0.4.11` to minimize disruption). 166 167## [0.4.12] - 2020-12-24 168 169### New 170 171* Support platforms without atomics by racing instead of failing to compile 172* Implement `Log` for `Box<T: Log>` 173* Update `cfg-if` to `1.0` 174* Internal reworks of the structured logging API. Removed the `Fill` API 175and added `source::as_map` and `source::as_list` to easily serialize a `Source` 176as either a map of `{key: value, ..}` or as a list of `[(key, value), ..]`. 177 178### Fixed 179 180* Fixed deserialization of `LevelFilter` to use their `u64` index variants 181 182## [0.4.11] - 2020-07-09 183 184### New 185 186* Support coercing structured values into concrete types. 187* Reference the `win_dbg_logger` in the readme. 188 189### Fixed 190 191* Updates a few deprecated items used internally. 192* Fixed issues in docs and expands sections. 193* Show the correct build badge in the readme. 194* Fix up a possible inference breakage with structured value errors. 195* Respect formatting flags in structured value formatting. 196 197## [0.4.10] - 2019-12-16 (yanked) 198 199### Fixed 200 201* Fixed the `log!` macros, so they work in expression context (this regressed in `0.4.9`, which has been yanked). 202 203## [0.4.9] - 2019-12-12 (yanked) 204 205### Minimum Supported Rust Version 206 207This release bumps the minimum compiler version to `1.31.0`. This was mainly needed for `cfg-if`, 208but between `1.16.0` and `1.31.0` there are a lot of language and library improvements we now 209take advantage of. 210 211### New 212 213* Unstable support for capturing key-value pairs in a record using the `log!` macros 214 215### Improved 216 217* Better documentation for max level filters. 218* Internal updates to line up with bumped MSRV 219 220## [0.4.8] - 2019-07-28 221 222### New 223 224* Support attempting to get `Record` fields as static strings. 225 226## [0.4.7] - 2019-07-06 227 228### New 229 230* Support for embedded environments with thread-unsafe initialization. 231* Initial unstable support for capturing structured data under the `kv_unstable` 232feature gate. This new API doesn't affect existing users and may change in future 233patches (so those changes may not appear in the changelog until it stabilizes). 234 235### Improved 236 237* Docs for using `log` with the 2018 edition. 238* Error messages for macros missing arguments. 239 240## [0.4.6] - 2018-10-27 241 242### Improved 243 244* Support 2018-style macro import for the `log_enabled!` macro. 245 246## [0.4.5] - 2018-09-03 247 248### Improved 249 250* Make `log`'s internal helper macros less likely to conflict with user-defined 251 macros. 252 253## [0.4.4] - 2018-08-17 254 255### Improved 256 257* Support 2018-style imports of the log macros. 258 259## [0.4.3] - 2018-06-29 260 261### Improved 262 263* More code generation improvements. 264 265## [0.4.2] - 2018-06-05 266 267### Improved 268 269* Log invocations now generate less code. 270 271### Fixed 272 273* Example Logger implementations now properly set the max log level. 274 275## [0.4.1] - 2017-12-30 276 277### Fixed 278 279* Some doc links were fixed. 280 281## [0.4.0] - 2017-12-24 282 283The changes in this release include cleanup of some obscure functionality and a more robust public 284API designed to support bridges to other logging systems, and provide more flexibility to new 285features in the future. 286 287### Compatibility 288 289Vast portions of the Rust ecosystem use the 0.3.x release series of log, and we don't want to force 290the community to go through the pain of upgrading every crate to 0.4.x at the exact same time. Along 291with 0.4.0, we've published a new 0.3.9 release which acts as a "shim" over 0.4.0. This will allow 292crates using either version to coexist without losing messages from one side or the other. 293 294There is one caveat - a log message generated by a crate using 0.4.x but consumed by a logging 295implementation using 0.3.x will not have a file name or module path. Applications affected by this 296can upgrade their logging implementations to one using 0.4.x to avoid losing this information. The 297other direction does not lose any information, fortunately! 298 299**TL;DR** Libraries should feel comfortable upgrading to 0.4.0 without treating that as a breaking 300change. Applications may need to update their logging implementation (e.g. env-logger) to a newer 301version using log 0.4.x to avoid losing module and file information. 302 303### New 304 305* The crate is now `no_std` by default. 306* `Level` and `LevelFilter` now implement `Serialize` and `Deserialize` when the `serde` feature is 307 enabled. 308* The `Record` and `Metadata` types can now be constructed by third-party code via a builder API. 309* The `logger` free function returns a reference to the logger implementation. This, along with the 310 ability to construct `Record`s, makes it possible to bridge from another logging framework to 311 this one without digging into the private internals of the crate. The standard `error!` `warn!`, 312 etc., macros now exclusively use the public API of the crate rather than "secret" internal APIs. 313* `Log::flush` has been added to allow crates to tell the logging implementation to ensure that all 314 "in flight" log events have been persisted. This can be used, for example, just before an 315 application exits to ensure that asynchronous log sinks finish their work. 316 317### Removed 318 319* The `shutdown` and `shutdown_raw` functions have been removed. Supporting shutdown significantly 320 complicated the implementation and imposed a performance cost on each logging operation. 321* The `log_panics` function and its associated `nightly` Cargo feature have been removed. Use the 322 [log-panics](https://crates.io/crates/log-panics) instead. 323 324### Changed 325 326* The `Log` prefix has been removed from type names. For example, `LogLevelFilter` is now 327 `LevelFilter`, and `LogRecord` is now `Record`. 328* The `MaxLogLevelFilter` object has been removed in favor of a `set_max_level` free function. 329* The `set_logger` free functions have been restructured. The logger is now directly passed to the 330 functions rather than a closure which returns the logger. `set_logger` now takes a `&'static 331 Log` and is usable in `no_std` contexts in place of the old `set_logger_raw`. `set_boxed_logger` 332 is a convenience function which takes a `Box<Log>` but otherwise acts like `set_logger`. It 333 requires the `std` feature. 334* The `file` and `module_path` values in `Record` no longer have the `'static` lifetime to support 335 integration with other logging frameworks that don't provide a `'static` lifetime for the 336 equivalent values. 337* The `file`, `line`, and `module_path` values in `Record` are now `Option`s to support integration 338 with other logging frameworks that don't provide those values. 339 340### In the Future 341 342* We're looking to add support for *structured* logging - the inclusion of extra key-value pairs of 343 information in a log event in addition to the normal string message. This should be able to be 344 added in a backwards compatible manner to the 0.4.x series when the design is worked out. 345 346## Older 347 348Look at the [release tags] for information about older releases. 349 350[Unreleased]: https://github.com/rust-lang-nursery/log/compare/0.4.26...HEAD 351[0.4.26]: https://github.com/rust-lang/log/compare/0.4.25...0.4.26 352[0.4.25]: https://github.com/rust-lang/log/compare/0.4.24...0.4.25 353[0.4.24]: https://github.com/rust-lang/log/compare/0.4.23...0.4.24 354[0.4.23]: https://github.com/rust-lang/log/compare/0.4.22...0.4.23 355[0.4.22]: https://github.com/rust-lang/log/compare/0.4.21...0.4.22 356[0.4.21]: https://github.com/rust-lang/log/compare/0.4.20...0.4.21 357[0.4.20]: https://github.com/rust-lang-nursery/log/compare/0.4.19...0.4.20 358[0.4.19]: https://github.com/rust-lang-nursery/log/compare/0.4.18...0.4.19 359[0.4.18]: https://github.com/rust-lang-nursery/log/compare/0.4.17...0.4.18 360[0.4.17]: https://github.com/rust-lang-nursery/log/compare/0.4.16...0.4.17 361[0.4.16]: https://github.com/rust-lang-nursery/log/compare/0.4.15...0.4.16 362[0.4.15]: https://github.com/rust-lang-nursery/log/compare/0.4.13...0.4.15 363[0.4.14]: https://github.com/rust-lang-nursery/log/compare/0.4.13...0.4.14 364[0.4.13]: https://github.com/rust-lang-nursery/log/compare/0.4.11...0.4.13 365[0.4.12]: https://github.com/rust-lang-nursery/log/compare/0.4.11...0.4.12 366[0.4.11]: https://github.com/rust-lang-nursery/log/compare/0.4.10...0.4.11 367[0.4.10]: https://github.com/rust-lang-nursery/log/compare/0.4.9...0.4.10 368[0.4.9]: https://github.com/rust-lang-nursery/log/compare/0.4.8...0.4.9 369[0.4.8]: https://github.com/rust-lang-nursery/log/compare/0.4.7...0.4.8 370[0.4.7]: https://github.com/rust-lang-nursery/log/compare/0.4.6...0.4.7 371[0.4.6]: https://github.com/rust-lang-nursery/log/compare/0.4.5...0.4.6 372[0.4.5]: https://github.com/rust-lang-nursery/log/compare/0.4.4...0.4.5 373[0.4.4]: https://github.com/rust-lang-nursery/log/compare/0.4.3...0.4.4 374[0.4.3]: https://github.com/rust-lang-nursery/log/compare/0.4.2...0.4.3 375[0.4.2]: https://github.com/rust-lang-nursery/log/compare/0.4.1...0.4.2 376[0.4.1]: https://github.com/rust-lang-nursery/log/compare/0.4.0...0.4.1 377[0.4.0]: https://github.com/rust-lang-nursery/log/compare/0.3.8...0.4.0 378[release tags]: https://github.com/rust-lang-nursery/log/releases 379