log
A lightweight logging facade for Rust
0.4.34
1.2B downloads/mo
#29 most downloaded on crates.io
rust-lang/log
What this package is like to depend on
Last release today
22 Aug 2026
Ships fairly regularly
a new release about every 3 months
Some releases are documented
notes for 30 of 57 stable releases
6 versions withdrawn
withdrawn after publishing
12 years old
64 releases · first in 2014
7 releases in the last 12 months
see the full history below
Release timeline
64 releases · Dec 2014 to Aug 2026Releases
latest 60 of 64-
0.4.3422 Aug 2026Release notes
Open source →What's Changed
- doc: Add context-logger utility to README by @alekseysidorov in #735
- Add alloc support for boxed loggers by @malezjaa in #737
New Contributors
- @alekseysidorov made their first contribution in #735
- @malezjaa made their first contribution in #737
Full Changelog: 0.4.33...0.4.34
-
0.4.3320 Jun 2026Release notes
Open source →What's Changed
- Fixed key comparison by @matteo-zeggiotti-ok in #732
New Contributors
- @matteo-zeggiotti-ok made their first contribution in #732
Full Changelog: 0.4.32...0.4.33
-
0.4.3204 Jun 2026Release notes
Open source →What's Changed
- Support
Value-> string conversions withkv+stdfeatures instead ofkv_stdby @tisonkun in #729 - Prepare for 0.4.32 release by @KodrAus in #730
Full Changelog: 0.4.31...0.4.32
Release notes
Open source →What's Changed
- Support
Value-> string conversions withkv+stdfeatures instead ofkv_stdby @tisonkun in https://github.com/rust-lang/log/pull/729
Full Changelog: https://github.com/rust-lang/log/compare/0.4.31...0.4.32
- Support
-
0.4.3102 Jun 2026Release notes
Open source →What's Changed
- fix typos in kv compile errors and log documentation by @Isvane in #726
- Leverage static str key when possible by @tisonkun in #727
- Prepare for 0.4.31 release by @KodrAus in #728
New Contributors
Full Changelog: 0.4.30...0.4.31
Release notes
Open source →What's Changed
- Leverage static str key when possible by @tisonkun in https://github.com/rust-lang/log/pull/727
New Contributors
- @Isvane made their first contribution in https://github.com/rust-lang/log/pull/726
Full Changelog: https://github.com/rust-lang/log/compare/0.4.30...0.4.31
-
0.4.3025 May 2026Release notes
Open source →What's Changed
New Contributors
- @V0ldek made their first contribution in #720
- @woodruffw made their first contribution in #723
Full Changelog: 0.4.29...0.4.30
Notable Changes
- MSRV is bumped to 1.71.0 in #723
Release notes
Open source →What's Changed
- Support capturing of
std::nettypes by @KodrAus in https://github.com/rust-lang/log/pull/724
New Contributors
- @V0ldek made their first contribution in https://github.com/rust-lang/log/pull/720
- @woodruffw made their first contribution in https://github.com/rust-lang/log/pull/723
Full Changelog: https://github.com/rust-lang/log/compare/0.4.29...0.4.30
Notable Changes
- MSRV is bumped to 1.71.0 in https://github.com/rust-lang/log/pull/723
-
0.4.2902 Dec 2025Release notes
Open source →MSRV
This release increases
log's MSRV from1.61.0to1.68.0.What's Changed
- docs: Add missing impls from README.md by @AldaronLau in #703
- Point to new URLs for favicon and logo by @AldaronLau in #704
- perf: reduce llvm-lines of FromStr for
LevelandLevelFilterby @dishmaker in #709 - Replace serde with serde_core by @Thomasdezeeuw in #712
- Fix clippy lints by @Thomasdezeeuw in #713
- Use GitHub Actions to install Rust and cargo-hack by @Thomasdezeeuw in #715
- Exclude old unstable_kv features from testing matrix by @Thomasdezeeuw in #716
- Fix up CI by @KodrAus in #718
- Prepare for 0.4.29 release by @KodrAus in #719
New Contributors
- @AldaronLau made their first contribution in #703
- @dishmaker made their first contribution in #709
Full Changelog: 0.4.28...0.4.29
Release notes
Open source →What's Changed
- perf: reduce llvm-lines of FromStr for
LevelandLevelFilterby @dishmaker in https://github.com/rust-lang/log/pull/709 - Replace serde with serde_core by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/712
New Contributors
- @AldaronLau made their first contribution in https://github.com/rust-lang/log/pull/703
- @dishmaker made their first contribution in https://github.com/rust-lang/log/pull/709
Full Changelog: https://github.com/rust-lang/log/compare/0.4.28...0.4.29
-
0.4.2803 Sep 2025Release notes
Open source →What's Changed
- ci: drop really old trick and ensure MSRV for all feature combo by @tisonkun in #676
- chore: fix some typos in comment by @xixishidibei in #677
- Unhide
#[derive(Debug)]in example by @ZylosLumen in #688 - Chore: delete compare_exchange method for AtomicUsize on platforms without atomics by @HaoliangXu in #690
- Add
increment_severity()anddecrement_severity()methods forLevelandLevelFilterby @nebkor in #692 - Prepare for 0.4.28 release by @KodrAus in #695
New Contributors
- @xixishidibei made their first contribution in #677
- @ZylosLumen made their first contribution in #688
- @HaoliangXu made their first contribution in #690
- @nebkor made their first contribution in #692
Full Changelog: 0.4.27...0.4.28
Release notes
Open source →What's Changed
- ci: drop really old trick and ensure MSRV for all feature combo by @tisonkun in https://github.com/rust-lang/log/pull/676
- Chore: delete compare_exchange method for AtomicUsize on platforms without atomics by @HaoliangXu in https://github.com/rust-lang/log/pull/690
- Add
increment_severity()anddecrement_severity()methods forLevelandLevelFilterby @nebkor in https://github.com/rust-lang/log/pull/692
-
0.4.2724 Mar 2025Release notes
Open source →What's Changed
- A few minor lint fixes by @nyurik in #671
- Enable clippy support for format-like macros by @nyurik in #665
- Add an optional logger param by @tisonkun in #664
- Pass global logger by value, supplied logger by ref by @KodrAus in #673
- Prepare for 0.4.27 release by @KodrAus in #674
Full Changelog: 0.4.26...0.4.27
Release notes
Open source →What's Changed
- A few minor lint fixes by @nyurik in https://github.com/rust-lang/log/pull/671
- Enable clippy support for format-like macros by @nyurik in https://github.com/rust-lang/log/pull/665
- Add an optional logger param by @tisonkun in https://github.com/rust-lang/log/pull/664
- Pass global logger by value, supplied logger by ref by @KodrAus in https://github.com/rust-lang/log/pull/673
Full Changelog: https://github.com/rust-lang/log/compare/0.4.26...0.4.27
-
0.4.2621 Feb 2025Release notes
Open source →What's Changed
- Derive
Cloneforkv::Valueby @SpriteOvO in #668 - Add
spdlog-rslink to crate doc by @SpriteOvO in #669 - Prepare for 0.4.26 release by @KodrAus in #670
Full Changelog: 0.4.25...0.4.26
Release notes
Open source →What's Changed
- Derive
Cloneforkv::Valueby @SpriteOvO in https://github.com/rust-lang/log/pull/668 - Add
spdlog-rslink to crate doc by @SpriteOvO in https://github.com/rust-lang/log/pull/669
Full Changelog: https://github.com/rust-lang/log/compare/0.4.25...0.4.26
- Derive
-
0.4.2514 Jan 2025Release notes
Open source →What's Changed
- Revert loosening of kv cargo features by @KodrAus in #662
- Prepare for 0.4.25 release by @KodrAus in #663
Full Changelog: 0.4.24...0.4.25
Release notes
Open source →What's Changed
- Revert loosening of kv cargo features by @KodrAus in https://github.com/rust-lang/log/pull/662
Full Changelog: https://github.com/rust-lang/log/compare/0.4.24...0.4.25
-
0.4.2410 Jan 2025 withdrawnRelease notes
Open source →What's Changed
- Fix up kv feature activation by @KodrAus in https://github.com/rust-lang/log/pull/659
Full Changelog: https://github.com/rust-lang/log/compare/0.4.23...0.4.24
-
0.4.2310 Jan 2025 withdrawnRelease notes
Open source →What's Changed
- Fix some typos by @Kleinmarb in https://github.com/rust-lang/log/pull/637
- Add logforth to implementation by @tisonkun in https://github.com/rust-lang/log/pull/638
- Add
spdlog-rslink to README by @SpriteOvO in https://github.com/rust-lang/log/pull/639 - Add correct lifetime to kv::Value::to_borrowed_str by @stevenroose in https://github.com/rust-lang/log/pull/643
- docs: Add logforth as an impl by @tisonkun in https://github.com/rust-lang/log/pull/642
- Add clang_log implementation by @DDAN-17 in https://github.com/rust-lang/log/pull/646
- 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
- Fix up key lifetimes and add method to try get a borrowed key by @KodrAus in https://github.com/rust-lang/log/pull/653
- Add Ftail implementation by @tjardoo in https://github.com/rust-lang/log/pull/652
New Contributors
- @Kleinmarb made their first contribution in https://github.com/rust-lang/log/pull/637
- @tisonkun made their first contribution in https://github.com/rust-lang/log/pull/638
- @SpriteOvO made their first contribution in https://github.com/rust-lang/log/pull/639
- @stevenroose made their first contribution in https://github.com/rust-lang/log/pull/643
- @DDAN-17 made their first contribution in https://github.com/rust-lang/log/pull/646
- @gbbosak made their first contribution in https://github.com/rust-lang/log/pull/648
- @tjardoo made their first contribution in https://github.com/rust-lang/log/pull/652
Full Changelog: https://github.com/rust-lang/log/compare/0.4.22...0.4.23
-
0.4.2228 Jun 2024Release notes
Open source →What's Changed
- Add some clarifications to the library docs by @KodrAus in https://github.com/rust-lang/log/pull/620
- Add links to
cologcrate by @chrivers in https://github.com/rust-lang/log/pull/621 - adding line_number test + updating some testing infrastructure by @DIvkov575 in https://github.com/rust-lang/log/pull/619
- Clarify the actual set of functions that can race in _racy variants by @KodrAus in https://github.com/rust-lang/log/pull/623
- Replace deprecated std::sync::atomic::spin_loop_hint() by @Catamantaloedis in https://github.com/rust-lang/log/pull/625
- Check usage of max_level features by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/627
- Remove unneeded import by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/628
- 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
- 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
New Contributors
- @chrivers made their first contribution in https://github.com/rust-lang/log/pull/621
- @DIvkov575 made their first contribution in https://github.com/rust-lang/log/pull/619
- @Catamantaloedis made their first contribution in https://github.com/rust-lang/log/pull/625
Full Changelog: https://github.com/rust-lang/log/compare/0.4.21...0.4.22
-
0.4.2128 Feb 2024Release notes
Open source →What's Changed
- Minor clippy nits by @nyurik in https://github.com/rust-lang/log/pull/578
- Simplify Display impl by @nyurik in https://github.com/rust-lang/log/pull/579
- Set all crates to 2021 edition by @nyurik in https://github.com/rust-lang/log/pull/580
- Various changes based on review by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/583
- Fix typo in file_static() method doc by @dimo414 in https://github.com/rust-lang/log/pull/590
- Specialize empty key value pairs by @EFanZh in https://github.com/rust-lang/log/pull/576
- Fix incorrect lifetime in Value::to_str() by @peterjoel in https://github.com/rust-lang/log/pull/587
- Remove some API of the key-value feature by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/585
- Add logcontrol-log and log-reload by @swsnr in https://github.com/rust-lang/log/pull/595
- Add Serialization section to kv::Value docs by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/593
- Rename Value::to_str to to_cow_str by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/592
- Clarify documentation and simplify initialization of
STATIC_MAX_LEVELby @ptosi in https://github.com/rust-lang/log/pull/594 - Update docs to 2021 edition, test by @nyurik in https://github.com/rust-lang/log/pull/577
- Add "alterable_logger" link to README.md by @brummer-simon in https://github.com/rust-lang/log/pull/589
- Normalize line ending by @EFanZh in https://github.com/rust-lang/log/pull/602
- Remove
ok_orin favor ofOption::ok_orby @AngelicosPhosphoros in https://github.com/rust-lang/log/pull/607 - Use
Acquireordering for initialization check by @AngelicosPhosphoros in https://github.com/rust-lang/log/pull/610 - Get structured logging API ready for stabilization by @KodrAus in https://github.com/rust-lang/log/pull/613
New Contributors
- @nyurik made their first contribution in https://github.com/rust-lang/log/pull/578
- @dimo414 made their first contribution in https://github.com/rust-lang/log/pull/590
- @peterjoel made their first contribution in https://github.com/rust-lang/log/pull/587
- @ptosi made their first contribution in https://github.com/rust-lang/log/pull/594
- @brummer-simon made their first contribution in https://github.com/rust-lang/log/pull/589
- @AngelicosPhosphoros made their first contribution in https://github.com/rust-lang/log/pull/607
-
0.4.2012 Aug 2023Release notes
Open source →- Remove rustversion dev-dependency by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/568
- Remove
local_inner_macrosusage by @EFanZh in https://github.com/rust-lang/log/pull/570
-
0.4.1911 Jun 2023Release notes
Open source →- Use target_has_atomic instead of the old atomic_cas cfg by @GuillaumeGomez in https://github.com/rust-lang/log/pull/555
- Put MSRV into Cargo.toml by @est31 in https://github.com/rust-lang/log/pull/557
-
0.4.1828 May 2023Release notes
Open source →- fix Markdown links (again) by @hellow554 in https://github.com/rust-lang/log/pull/513
- add cargo doc to workflow by @hellow554 in https://github.com/rust-lang/log/pull/515
- Apply Clippy lints by @hellow554 in https://github.com/rust-lang/log/pull/516
- Replace ad-hoc eq_ignore_ascii_case with slice::eq_ignore_ascii_case by @glandium in https://github.com/rust-lang/log/pull/519
- fix up windows targets by @KodrAus in https://github.com/rust-lang/log/pull/528
- typo fix by @jiangying000 in https://github.com/rust-lang/log/pull/529
- Remove dependency on cfg_if by @EriKWDev in https://github.com/rust-lang/log/pull/536
- GitHub Workflows security hardening by @sashashura in https://github.com/rust-lang/log/pull/538
- Fix build status badge by @atouchet in https://github.com/rust-lang/log/pull/539
- Add call_logger to the documentation by @a1ecbr0wn in https://github.com/rust-lang/log/pull/547
- Use stable internals for key-value API by @KodrAus in https://github.com/rust-lang/log/pull/550
- Change wording of list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/553
- Add std-logger to list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/554
- Add
set_max_level_racyand gateset_max_levelby @djkoloski in https://github.com/rust-lang/log/pull/544 - [doc] src/lib.rs : prefix an unused variable with an underscore by @OccupyMars2025 in https://github.com/rust-lang/log/pull/561
- [doc] src/macros.rs : correct grammar errors of an example in lib documentation by @OccupyMars2025 in https://github.com/rust-lang/log/pull/562
-
0.4.1702 May 2022 -
0.4.1622 Mar 2022 -
0.4.1522 Mar 2022Release notes
Open source →- Silence a warning about the deprecated
spin_loop_hint. - Relax ordering in the atomic
set_max_levelcall. - Add thumbv4t-none-eabi to targets that don't support atomics
- Allow levels to be iterated over.
- Implement
Logon some common wrapper types. - Improvements to test coverage.
- Improvements to documentation.
- Add key-value support to the
log!macros. - Tighten
kv_unstableinternal dependencies, so they don't bump past their current alpha. - Add a simple visit API to
kv_unstable. - Support
NonZero*integers as values in structured logging - Support static strings as keys in structured logging
- Silence a warning about the deprecated
-
0.4.1427 Jan 2021Release notes
Open source →- Remove the
__private_api_log_litspecial case. - Fixed incorrect combination of
kv_unstableandstdfeatures causing compile failures. - Remove unstable
Value::to_*conversions that were incorrectly usingas. - Rename unstable
Value::to_errortoValue::to_borrowed_error.
- Remove the
-
0.4.1311 Jan 2021Release notes
Open source →- This is the same as
0.4.11, except with akv_unstable_stdfeature added to aid migrating current dependents to0.4.14(which was originally going to be0.4.13until it was decided to create a patch from0.4.11to minimize disruption).
- This is the same as
-
0.4.1208 Jan 2021 withdrawnRelease notes
Open source →New
- Support platforms without atomics by racing instead of failing to compile
- Implement
LogforBox<T: Log> - Update
cfg-ifto1.0 - Internal reworks of the structured logging API. Removed the
FillAPI and addedsource::as_mapandsource::as_listto easily serialize aSourceas either a map of{key: value, ..}or as a list of[(key, value), ..].
Fixed
- Fixed deserialization of
LevelFilterto use theiru64index variants
-
0.4.1116 Jul 2020Release notes
Open source →New
- Support coercing structured values into concrete types.
- Reference the
win_dbg_loggerin the readme.
Fixed
- Updates a few deprecated items used internally.
- Fixed issues in docs and expands sections.
- Show the correct build badge in the readme.
- Fix up a possible inference breakage with structured value errors.
- Respect formatting flags in structured value formatting.
-
0.4.1016 Dec 2019 withdrawnRelease notes
Open source →Fixed
- Fixed the
log!macros, so they work in expression context (this regressed in0.4.9, which has been yanked).
- Fixed the
-
0.4.915 Dec 2019 withdrawnRelease notes
Open source →Minimum Supported Rust Version
This release bumps the minimum compiler version to
1.31.0. This was mainly needed forcfg-if, but between1.16.0and1.31.0there are a lot of language and library improvements we now take advantage of.New
- Unstable support for capturing key-value pairs in a record using the
log!macros
Improved
- Better documentation for max level filters.
- Internal updates to line up with bumped MSRV
- Unstable support for capturing key-value pairs in a record using the
-
0.4.828 Jul 2019 -
0.4.710 Jul 2019Release notes
Open source →New
- Support for embedded environments with thread-unsafe initialization.
- Initial unstable support for capturing structured data under the
kv_unstablefeature gate. This new API doesn't affect existing users and may change in future patches (so those changes may not appear in the changelog until it stabilizes).
Improved
- Docs for using
logwith the 2018 edition. - Error messages for macros missing arguments.
-
0.4.627 Oct 2018 -
0.4.503 Sep 2018Release notes
Open source →Improved
- Make
log's internal helper macros less likely to conflict with user-defined macros.
- Make
-
0.4.417 Aug 2018 -
0.4.329 Jun 2018 -
0.4.206 Jun 2018Release notes
Open source →Improved
- Log invocations now generate less code.
Fixed
- Example Logger implementations now properly set the max log level.
-
0.4.130 Dec 2017 -
0.4.024 Dec 2017Release notes
Open source →The changes in this release include cleanup of some obscure functionality and a more robust public API designed to support bridges to other logging systems, and provide more flexibility to new features in the future.
Compatibility
Vast portions of the Rust ecosystem use the 0.3.x release series of log, and we don't want to force the community to go through the pain of upgrading every crate to 0.4.x at the exact same time. Along with 0.4.0, we've published a new 0.3.9 release which acts as a "shim" over 0.4.0. This will allow crates using either version to coexist without losing messages from one side or the other.
There is one caveat - a log message generated by a crate using 0.4.x but consumed by a logging implementation using 0.3.x will not have a file name or module path. Applications affected by this can upgrade their logging implementations to one using 0.4.x to avoid losing this information. The other direction does not lose any information, fortunately!
TL;DR Libraries should feel comfortable upgrading to 0.4.0 without treating that as a breaking change. Applications may need to update their logging implementation (e.g. env-logger) to a newer version using log 0.4.x to avoid losing module and file information.
New
- The crate is now
no_stdby default. LevelandLevelFilternow implementSerializeandDeserializewhen theserdefeature is enabled.- The
RecordandMetadatatypes can now be constructed by third-party code via a builder API. - The
loggerfree function returns a reference to the logger implementation. This, along with the ability to constructRecords, makes it possible to bridge from another logging framework to this one without digging into the private internals of the crate. The standarderror!warn!, etc., macros now exclusively use the public API of the crate rather than "secret" internal APIs. Log::flushhas been added to allow crates to tell the logging implementation to ensure that all "in flight" log events have been persisted. This can be used, for example, just before an application exits to ensure that asynchronous log sinks finish their work.
Removed
- The
shutdownandshutdown_rawfunctions have been removed. Supporting shutdown significantly complicated the implementation and imposed a performance cost on each logging operation. - The
log_panicsfunction and its associatednightlyCargo feature have been removed. Use the log-panics instead.
Changed
- The
Logprefix has been removed from type names. For example,LogLevelFilteris nowLevelFilter, andLogRecordis nowRecord. - The
MaxLogLevelFilterobject has been removed in favor of aset_max_levelfree function. - The
set_loggerfree functions have been restructured. The logger is now directly passed to the functions rather than a closure which returns the logger.set_loggernow takes a&'static Logand is usable inno_stdcontexts in place of the oldset_logger_raw.set_boxed_loggeris a convenience function which takes aBox<Log>but otherwise acts likeset_logger. It requires thestdfeature. - The
fileandmodule_pathvalues inRecordno longer have the'staticlifetime to support integration with other logging frameworks that don't provide a'staticlifetime for the equivalent values. - The
file,line, andmodule_pathvalues inRecordare nowOptions to support integration with other logging frameworks that don't provide those values.
In the Future
- We're looking to add support for structured logging - the inclusion of extra key-value pairs of information in a log event in addition to the normal string message. This should be able to be added in a backwards compatible manner to the 0.4.x series when the design is worked out.
- The crate is now
-
0.4.0-rc.106 Dec 2017 pre-releaseNothing published for this version
-
0.3.924 Dec 2017Nothing published for this version
-
0.3.824 May 2017Nothing published for this version
-
0.3.708 Mar 2017Nothing published for this version
-
0.3.601 Apr 2016Nothing published for this version
-
0.3.516 Jan 2016Nothing published for this version
-
0.3.426 Nov 2015Nothing published for this version
-
0.3.327 Oct 2015Nothing published for this version
-
0.3.227 Aug 2015Nothing published for this version
-
0.3.128 Mar 2015Nothing published for this version
-
0.3.024 Mar 2015Nothing published for this version
-
0.2.623 Mar 2015 withdrawnNothing published for this version
-
0.2.526 Feb 2015Nothing published for this version
-
0.2.419 Feb 2015Nothing published for this version
-
0.2.309 Feb 2015Nothing published for this version
-
0.2.203 Feb 2015Nothing published for this version
-
0.2.128 Jan 2015Nothing published for this version
-
0.2.027 Jan 2015Nothing published for this version
-
0.1.1023 Jan 2015Nothing published for this version
-
0.1.909 Jan 2015Nothing published for this version
-
0.1.807 Jan 2015Nothing published for this version
-
0.1.703 Jan 2015Nothing published for this version
-
0.1.602 Jan 2015Nothing published for this version
-
0.1.529 Dec 2014Nothing published for this version
-
0.1.424 Dec 2014Nothing published for this version