PackageTrack
Sign in Get early access

slog

Structured, extensible, composable logging for Rust

2.8.2 74M downloads/mo #962 most downloaded on crates.io slog-rs/slog

What this package is like to depend on

Last release 10 months ago

11 Oct 2025

Release timing varies

gaps range from 2 weeks to 2.8 years

Most releases are documented

notes for 33 of 48 stable releases

8 versions withdrawn

withdrawn after publishing

10 years old

70 releases · first in 2016

3 releases in the last 12 months

see the full history below

Release timeline

70 releases · Jun 2016 to Oct 2025
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 70
  1. 2.8.2 11 Oct 2025
    Release notes

    Fixed

    • Fix use of # operator in macros due to private field (issue #364)
      • Thanks to @Manishearth for identifying this.
    • ci: Check the tests pass with -Zminimal-versions
    Open source →
  2. 2.8.1 09 Oct 2025 withdrawn
    Release notes

    This fixes an accidental breaking change in the v2.8.0 release, where the public API was changed from erased_serde v0.4 to erased_serde v0.3. This should not affect normal users of the API but could break drains supporting nested-values.

    I (@Techcable) apologize for this breakage and have yanked the 2.8.0 release due to this issue. I will try to setup cargo-semver-checks in the CI to avoid this in the future.

    Fixed

    • Restore compatibility with erased-serde version 0.3.
      • Compatibility with erased-serde version 0.4 may be provided again in a future version, but will be done so in a backwards compatible way.
      • Thanks to @demurgos for recognizing and fixing this in PR #359
    • Ensure compatibility with -Zminimal-versions flag by specifying minimal dependency versions (fixes #357)
    Open source →
  3. 2.8.0 05 Oct 2025 withdrawn
    Release notes

    This is the biggest slog release since 2.0. It fully preserves compatibility with prior releases.

    Highlights

    • Enables the nested-values feature by default. The next major release of slog_json, slog_term, etc should also enable this feature by default.
    • Added Logger::flush and Drain::flush methods.
    • Improved support for logging errors
      • Have # log specifier transparently support & references to error
      • Implement slog::Value for Box<dyn std::error::Error> and anyhow::Error
    • Define a prelude module for common imports
    • Upgraded to Rust 2018 and require Rust 1.61
      • Deprecate the old slog_log! macros in favor of slog::log!
    • Many internal improvements & bug fixes

    Changed

    • Enables the nested-values feature by default.
    • Updated to Rust 2018
    • Bump MSRV to 1.61
      • This is already required for erased-serde, syn, serde_core, and many other important crates in the rust ecosystem.
    • Update erased-serde from v0.3 to v0.4
    • Depend on serde_core rather than serde to reduce compile times.

    Added

    • Added a Logger::flush and Drain::flush methods
      • Since this is a new method, not all drains implement it. Calling it on an unsupported drain will give an error
    • Define a prelude module for common imports. Replace use slog::{Serde, Logger, info, debug, trace} with use slog::prelude::*
    • Optionally implement Drain for parking_lot::Mutex. This is noticeably faster than std::sync::Mutex, is smaller, and avoids poisoning.
      • 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
    • Implement slog::Value for dyn std::error::Error and Box<dyn std::error:Error (along with the Send/Sync versions).
    • Optionally implement slog::Value for anyhow::Error (requires anyhow feature)
    • Add ErrorRef wrapper to enable logging error references (PR #327)
      • The # error formatter in macros was updated to automatically select ErrorValue or ErrorRef (PR #328)
    • Add emit_bytes method (PR #290)
      • Control formatting using BytesKind enum
    • Implement Value for std::borrow::Cow

    Deprecated

    • Deprecate old prefixed macros like slog_log. Rust 2018 macro paths like slog::log! make these unnecessary.

    Fixed

    • Fix logging of references to errors (resolved by introduction of ErrorRef in PR #327)
    • Take advantage of the fact that in 1.81 std::error::Error has been moved to core. On this rust version, slog now supports the error trait without requiring std.
    • Add #[must_use] to most public types, including slog::Logger, slog::OwnedKV, and slog::FnValue.
    • Give a descriptive error when the nested-values feature is unsupported.
    • Alias the slog::Never type to std::convert::Infallible, fixing issue #209.
    • doc: Fix typo in slog::Value docs (issue #335)
      • Thank you to @larswirzenius for noticing this!
    • doc: Fix "lazy continuation" in slog::Logger doc
    • Fix some internal warnings
      • Example: Avoid the new #[warn(unexpected_cfgs)] lint.
      • The crate almost passes clippy::pedantic now, except for a few very verbose lints like clippy::must-use-candidate
      • None of these changes should affect user crates
    • Stop requiring the serde_derive crate to implement the nested-values feature. We depend on the new serde_core instead of even requiring serde.
    • The nested-values feature no longer requires serde/std (was a mistake).
    • Always support 128-bit integers, even on the wasm32-unknown-emscripten target.
    • Fix support for feature="nothreads"
      • Internal refactoring to make different feature combos much easier (PR #301)
    • Switch from Travis CI to Github Actions (fixes #294)
      • rustfmt --check now run by default
      • Require clippy to succeed without warnings
      • Require all feature combinations to pass tests.
        • Make exception for nested-values feature on MSRV (1.49), because erased-serde dependency requires edition="2021" (needs 1.56)
    • Fix # format when not used as a last argument.
    • Fix duplicate AsRef<str> implementations when using dynamic-keys feature.
    • Fix incorrect 'long' name for slog::Level::Warning (fixes issue #282)
    Open source →
  4. 2.8.0-rc.1 07 Aug 2025 pre-release
    Release notes

    Final release waiting for more feedback on PR #346,
    which would make nested-values a default feature.

    Open source →
  5. 2.8.0-beta.2 05 Jan 2024 pre-release

    Nothing published for this version

  6. 2.8.0-beta.1 10 Sep 2023 pre-release
    Release notes

    Update to Rust 2018
    Enable Github Actions

    Significant internal refactoring and cleanup.

    Open source →
  7. 2.7.0 30 Nov 2020
    Release notes

    Some minor improvements:

    • Implement Hash for Level and FilterLevel
    • Add #% for alternate display of the value part
    • Implement Eq for dynamic Keys
    • Add emit_error to Serializer, # for serializing foreign errors, and
      impl Value for std::io::Error

    Retroactively tagged by Techcable

    Open source →
    Release notes
    • Implement Hash for Level and FilterLevel
    • Add #% for alternate display of the value part
    • Implement Eq for dynamic Keys
    • Add emit_error to Serializer, # for serializing foreign errors, and impl Value for std::io::Error
    • Add Serde (if nested-values feature is enabled) to optionally wrap a value that implements [serde::Serialize] so it's written to the log record as an object, rather than a primitive.
    Open source →
  8. 2.5.2 22 Jul 2019
    Release notes
    • Restored parsing of Level and FilterLevel truncated names
    Open source →
  9. 2.5.1 11 Jul 2019 withdrawn
    Release notes
    • Added parsing of Level and FilterLevel short names
    Open source →
  10. 2.5.0 11 Jul 2019
    Release notes
    • Added FilterLevel::accepts
    • Added as_str, as_short_str and Display to FilterLevel
    Open source →
  11. 2.4.1 04 Oct 2018
    Release notes
    • disable support for i128/u128 types if rustc is old
    Open source →
  12. 2.4.0 29 Sep 2018
    Release notes
    • Implement Value for 128 bit integers
    • Add support 2018-style macro imports
      • WARNING: This is a breaking change that we couldn't avoid. Users using explicitly macro import (like #[macro_use(slog_o)]) must add __slog_builtin to the import list.
    • Bump minimum supported Rust version to 1.26
    Open source →
  13. 2.3.3 28 Aug 2018
    Release notes
    • impl Value for SocketAddr
    Open source →
  14. 2.3.2 26 Jul 2018
    Release notes
    • Revert broken changes:
      • Make ? and % formatters in kv! more flexible
      • Export local inner macros to help with Rust 2018 testing
    Open source →
  15. 2.3.1 21 Jul 2018 withdrawn

    Nothing published for this version

  16. 2.3.0 21 Jul 2018 withdrawn
    Release notes
    • Export local inner macros to help with Rust 2018 testing
    • Stabilize Record::new
    • Make ? and % formatters in kv! more flexible
    Open source →
  17. 2.2.3 28 Mar 2018
    Release notes
    • Fix (again) problems introduced by 2.2.1
    Open source →
  18. 2.2.2 26 Mar 2018
    Release notes
    • Fix problems introduced by 2.2.1
    Open source →
  19. 2.2.1 25 Mar 2018
    Release notes
    • Add is_x_enabled() for queering (imprecise) log-level
    Open source →
  20. 2.1.1 11 Dec 2017

    Nothing published for this version

  21. 2.1.0 11 Dec 2017
    Release notes

    Added

    • Support for nested-values through emit_serde, behind nested-values feature flag, disabled by default for backward compatibility. Note: Consider unstable for the time being.
    • Support for dynamic key (String vs &'static str), behind dynamic-keys feature flag, disabled by default for backward compatibility. Note: Consider unstable for the time being.
    Open source →
  22. 2.0.12 15 Sep 2017
    Release notes

    Changed

    • #[allow(dead_code) on unused log statements
    Open source →
  23. 2.0.11 14 Sep 2017
    Release notes

    Changed

    • Impl Value for std::path::Display
    Open source →
  24. 2.0.10 09 Sep 2017
    Release notes

    Changed

    • Remove unnecessary 'static bound on FnValue
    Open source →
  25. 2.0.9 23 Aug 2017
    Release notes

    Changed

    • Update README
    Open source →
  26. 2.0.8 23 Aug 2017

    Nothing published for this version

  27. 2.0.6 28 May 2017
    Release notes

    Changed

    • Fix for https://github.com/rust-lang/rust/pull/42125
    Open source →
  28. 2.0.5 16 May 2017
    Release notes

    Changed

    • Relicense under MPL/Apache/MIT
    Open source →
  29. 2.0.4 06 May 2017
    Release notes

    Fixed

    • Documentation improvements
    Open source →
  30. 2.0.3 06 May 2017
    Release notes

    Fixed

    • Documentation fixes
    Open source →
  31. 2.0.2 13 Apr 2017
    Release notes

    Fixed

    • Compile time logging level filtering
    Open source →
  32. 2.0.1 12 Apr 2017

    Nothing published for this version

  33. 2.0.0 12 Apr 2017
    Release notes

    Changed (since v1; bigger picture)

    • Unified and simplified logging macros structure and ordering.
    • Added logging Record tags.
    • Refactored key-value pairs traits and structures and overall handling.
      • It's now possible to impl KV for MyStruct.
      • kv! can be used to create on stack key-value list.
      • KV-implementing data can appear on the key-value list directly.
    • Support chaining of OwnedKVLists. Existing Logger can be used as a Drain to allow custom handling logic for a part of the logging hierarchy.
    • Added associated Ok type to Drain.
    • Support for Drains unwind safety.
    • Refactored Record to optimize performance on async operations.
    • slog-extra has been renamed to slog-async since that's the only functionality it contained.
    • slog-stream is obsoleted and won't be used in slog v2 at all. It was a wrong abstraction. Decorators functionality was moved to slog-term.
    • slog-term provides open Decorator traits to allow multiple terminal / file writing backends.
    • slog-term default Decorators use term crate and should work correctly on all supported OSes.
    • DrainExt has been removed and utility methods moved directly to Drain
    • slog-stdlog utilizes slog-scope directly.
    • Support for "typed" Loggers to allow squeezing last drops of performance possible, at the cost of T in Logger<T>.
    Open source →
  34. 2.0.0-alpha2 24 Feb 2017 pre-release withdrawn

    Nothing published for this version

  35. 2.0.0-alpha1 19 Feb 2017 pre-release withdrawn

    Nothing published for this version

  36. 2.0.0-alpha.3 05 Mar 2017 pre-release withdrawn

    Nothing published for this version

  37. 2.0.0-3.1 27 Mar 2017 pre-release
    Release notes

    Added

    • Support for fmt::Display values with % in kv!
    Open source →
  38. 2.0.0-3.0 26 Mar 2017 pre-release
    Release notes

    Changed

    • Added support for own KV and Value implementations
    • Streamlined the formatting syntax for log! and friends; BREAKING
    • Lazy values need explicit FnValue wrapper; BREKING

    Added

    • kv! macro
    Open source →
  39. 2.0.0-2.2 20 Mar 2017 pre-release
    Release notes

    Fixes

    • Bunch of trait-related fixes
    Open source →
  40. 2.0.0-2.1 19 Mar 2017 pre-release
    Release notes

    Fixed

    • Require MapErr and Filter to be UnwindSafe
    Open source →
  41. 2.0.0-2.0 12 Mar 2017 pre-release
    Release notes

    Changed

    • Make Logger::root return "erased" version
    • Introduce Logger::root_typed for "non-erased" Logger creation
    Open source →
  42. 2.0.0-1.0 05 Mar 2017 pre-release
    Release notes

    Fixed

    • fmt::Debug for MutexDrainError

    Changed

    • Parametrize Logger over the Drain it holds and introduce "erased" version
    • Enforcing UnwindSafe Drains for Loggers
    • Refactored key-value pairs traits and structures
    • Renamed some types
    • Support chaining of OwnedKVLists
    • Added associated Ok type to Drain
    • Refactored Record to optimize performance on async operations
    • Minimal rustc version required: 1.15.0
    • DrainExt has been removed and utility methods moved directly to Drain

    Added

    • Macros to create OwnedKV and BorrowedKV
    • Logger implements Drain
    Open source →
  43. 1.7.1 08 Nov 2017

    Nothing published for this version

  44. 1.7.0 08 Nov 2017

    Nothing published for this version

  45. 1.6.0 19 Oct 2017

    Nothing published for this version

  46. 1.5.2 08 Feb 2017

    Nothing published for this version

  47. 1.5.1 08 Feb 2017

    Nothing published for this version

  48. 1.5.0 06 Feb 2017
    Release notes

    Changed

    • Order of key-value pairs is now strictly defined

    Added

    • Logger implements Drain

    Deprecated

    • Creation of OwnedKeyValueList
    Open source →
  49. 1.4.1 19 Jan 2017
    Release notes

    Fixed

    • Fix an invalid syntax exposed by nightly rust change (Issue #103)
    Open source →
  50. 1.4.0 28 Dec 2016
    Release notes

    Changed

    • Updated documentation

    Deprecated

    • OwnedKeyValueList::id
    Open source →
  51. 1.3.2 20 Nov 2016
    Release notes

    Added

    • slog_o as an alternative name for o
    Open source →
  52. 1.3.1 20 Nov 2016
    Release notes

    Fixed

    • Cargo publishing mistake.
    Open source →
  53. 1.3.0 01 Nov 2016
    Release notes

    Changed

    • BREAKING: Removed default Send+Sync from Drain
    Open source →
  54. 1.2.1 28 Oct 2016
    Release notes

    Added

    • OwnedKeyValueList::id for owned key value unique identification
    Open source →
  55. 1.2.0 22 Oct 2016
    Release notes

    Changed

    • BREAKING: Serializer takes key : &'static str now

    Fixed

    • Corner cases in info!(...) and other macros
    Open source →
  56. 1.1.0 18 Oct 2016
    Release notes

    Changed

    • BREAKING: Rewrite handling of owned values.
    Open source →
  57. 1.0.1 10 Oct 2016
    Release notes

    Fixed

    • use std in o!

    Added

    • Implement fmt::Debug for Logger
    Open source →
  58. 1.0.0 20 Sep 2016
    Release notes

    First stable release.

    Open source →
  59. 1.0.0-alpha7 14 Sep 2016 pre-release

    Nothing published for this version

  60. 1.0.0-alpha6 12 Sep 2016 pre-release

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive