Skip to content
Dawid Ciężarkiewicz edited this page Mar 8, 2017 · 28 revisions

Status

Slog v2 is striving to be usable and in good shape now. API breaking changes between 2.0.0-x versions are possible, but if you use ~ operator you should not have to deal with unexpected breakage.

Latest set of ported core crates

slog = "2.0.0-1.0"
slog-async = "2.0.0-1.0"
slog-json = "2.0.0-1.0"
slog-bunyan = "2.0.0-1.0"
slog-term = "2.0.0-1.0"
slog-scope = "2.0.0-1.0"
slog-stdlog = "2.0.0-0.1"
slog-envlogger = "2.0.0-1.0"

Using slog v2 and versioning

Slog v2 will is being developed in the 0.x.y model, that was used to release 1.0.0. slog 2.0.0-1.0 should be treated as 0.1.0 version was, just working toward 2.0.0 release.

It's recommended to use the following to specify the dependeny on pre-release versions of crates ported to slog. eg.

slog = ~2.0.0-1"

Changes overview

Core crate:

  • 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

Other crates

  • 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 will be moved directly to slog-term.
  • slog-term will provide open io traits to allow multiple terminal / file writing backends.
Clone this wiki locally