v0.4.0 #75
SpriteOvO
announced in
Announcements
v0.4.0
#75
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Highlights / New Features
PatternFormatter
has been significantly improved.PatternFormatter
from a runtime string via the new macroruntime_pattern!
. (PR ImplementRuntimePattern
#45)JsonFormatter
serializes log into a single line of JSON object. (PR feat(spdlog): impl JsonFormatter #69, thank @NotEvenANeko)DedupSink
for skipping consecutive repeated logs.RotatingFileSink
now has a new rotation policyPeriod
rotates after a given period. (PR Feature/add duration rotation policy #74, thank @lioriz)on_thread_spawn
andon_thread_finish
forThreadPoolBuilder
allows to set callbacks for thread spawn and finish. (PR Add methods to provide on spawn and on finish tasks to thread pool builder #54, thank @fpervaiz)Record{,Owned}::tid
to get the thread ID when the log was generated.Improvements / Bug Fixes
AsyncPoolSink
may lose the last logs and may panic. (PR FlushAsyncPoolSink
on the current thread if tearing down #66)log
crate if present. (PR Add support for log target #50, thank @Lancern)Breaking Changes
Formatter::clone_box
is removed, now it requires all formatters to implementClone
. The inheritedDynClone
trait enables it to be cloned object-safely.FmtExtraInfo{,Builder}
has been replaced withFormatterContext
, andFormatter::format
now has a&mut FormatterContext
argument instead of returningResult<FmtExtraInfo>
.log
items has been moved from modulelog_crate
tore_export::log
.LevelFilter::compare
is renamed toLevelFilter::test
. The old method is still available, but has been marked as#[deprecated]
and may be removed in a future release.RecordOwned
in structSendToChannelErrorDropped
to avoid moving large structures on the stack.Sink::log
are no longer required to callshould_log
to filter logs. Now spdlog-rs will always check first by callingshould_log
, and only calllog
when it returnstrue
.PatternContext
now has 2 new lifetimes.Beta Was this translation helpful? Give feedback.
All reactions