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
kv
is 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
.AndroidSink
allows writing out logs to Android NDK log framework. (issue [Feature Request] AndroidSink #96, PR ImplementAndroidSink
#97)JournaldSink
passes an additionalTID
field to journald.BufWriter
for file sinks via new methods{FileSinkBuilder,RotatingFileSinkBuilder}::capacity
.log!
macro.ThreadPoolBuilder
,InvalidArgumentError::ThreadPoolCapacity
is marked as deprecated. (thanks @tisonkun, refactor: use a semantically nonzero type #94).Downstream(Box<dyn std::error::Error>
for downstream crates.swap_default_logger
function as#[must_use]
.runtime_pattern!
macro requiring explicitspdlog-internal
dependency.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 traitSink
inherits it. (issue [Feature Request] DecoupleSink
trait #71, PR DecoupleSink
trait #93)If you are implementing your own sink, you may want to define a field with type
SinkProp
within your sink and then implement the new traitGetSinkProp
for your sink. This will make your sink automatically get traitSinkPropAccess
implemented.{set_,}formatter
inLogger
and sink builders, anInto<Foramtter>
is now accepted instead of aBox<dyn Formatter>
.ErrorHandler
is 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::capacity
now accepts aNonZeroUsize
instead of ausize
.This discussion was created from the release v0.5.0.
Beta Was this translation helpful? Give feedback.
All reactions