v0.5.0 #101
SpriteOvO
announced in
Announcements
v0.5.0
#101
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Highlights / New Features
kvis accepted in logging macros for recording with structured key-value pairs.{kv}is added to pattern macros for writing out structured key-value pairs.Record::key_values.AndroidSinkallows writing out logs to Android NDK log framework. (issue [Feature Request] AndroidSink #96, PR ImplementAndroidSink#97)JournaldSinkpasses an additionalTIDfield to journald.BufWriterfor file sinks via new methods{FileSinkBuilder,RotatingFileSinkBuilder}::capacity.log!macro.ThreadPoolBuilder,InvalidArgumentError::ThreadPoolCapacityis marked as deprecated. (thanks @tisonkun, refactor: use a semantically nonzero type #94).Downstream(Box<dyn std::error::Error>for downstream crates.swap_default_loggerfunction as#[must_use].runtime_pattern!macro requiring explicitspdlog-internaldependency.Migrating from v0.4
v0.5 made some breaking changes for better interaction of downstream crates with
spdlog-rs.Sink::{level_filter,set_level_filter,set_formatter,set_error_handler}are moved to a new traitSinkPropAccess, and traitSinkinherits it. (issue [Feature Request] DecoupleSinktrait #71, PR DecoupleSinktrait #93)If you are implementing your own sink, you may want to define a field with type
SinkPropwithin your sink and then implement the new traitGetSinkPropfor your sink. This will make your sink automatically get traitSinkPropAccessimplemented.{set_,}formatterinLoggerand sink builders, anInto<Foramtter>is now accepted instead of aBox<dyn Formatter>.ErrorHandleris no longer used withOption, to represent an emptyErrorHandler, useErrorHandler::default(). This allows downstream crates to be able to call the internal default error handler. (Improve error API for downstream crate implementors #86)ThreadPoolBuilder::capacitynow accepts aNonZeroUsizeinstead of ausize.This discussion was created from the release v0.5.0.
Beta Was this translation helpful? Give feedback.
All reactions