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
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
PatternFormatterhas been significantly improved.PatternFormatterfrom a runtime string via the new macroruntime_pattern!. (PR ImplementRuntimePattern#45)JsonFormatterserializes log into a single line of JSON object. (PR feat(spdlog): impl JsonFormatter #69, thank @NotEvenANeko)DedupSinkfor skipping consecutive repeated logs.RotatingFileSinknow has a new rotation policyPeriodrotates after a given period. (PR Feature/add duration rotation policy #74, thank @lioriz)on_thread_spawnandon_thread_finishforThreadPoolBuilderallows 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}::tidto get the thread ID when the log was generated.Improvements / Bug Fixes
AsyncPoolSinkmay lose the last logs and may panic. (PR FlushAsyncPoolSinkon the current thread if tearing down #66)logcrate if present. (PR Add support for log target #50, thank @Lancern)Breaking Changes
Formatter::clone_boxis removed, now it requires all formatters to implementClone. The inheritedDynClonetrait enables it to be cloned object-safely.FmtExtraInfo{,Builder}has been replaced withFormatterContext, andFormatter::formatnow has a&mut FormatterContextargument instead of returningResult<FmtExtraInfo>.logitems has been moved from modulelog_cratetore_export::log.LevelFilter::compareis renamed toLevelFilter::test. The old method is still available, but has been marked as#[deprecated]and may be removed in a future release.RecordOwnedin structSendToChannelErrorDroppedto avoid moving large structures on the stack.Sink::logare no longer required to callshould_logto filter logs. Now spdlog-rs will always check first by callingshould_log, and only calllogwhen it returnstrue.PatternContextnow has 2 new lifetimes.Beta Was this translation helpful? Give feedback.
All reactions