v0.3.0 #16
SpriteOvO
announced in
Announcements
v0.3.0
#16
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.
-
Highlights
Performance is improved by 45% (see Benchmarks).
PatternFormatterwithpattern!macro allows users to configure logging format using a literal string at compile-time.AsyncPoolSinkcan be combined with any sink to process log records asynchronously (non-blocking).New Features
JournaldSinkwrites log records tosystemd-journal. (linuxtargets only)WriteSinkwrites log records to any object that implementsWritetrait.All sinks have now implemented
Builderstructs, which bring the ability for users to specify optional and required parameters in an unordered, flexible manner, and check for missing required parameters at compile-time.New function
init_env_level_fromallows parsing env-level from a user-given string instead of the environment variableSPDLOG_RS_LEVEL.New methods
LoggerBuilder::{fork_with, fork_with_name}can configure a new separate logger from an existing logger.More new items:
fn Logger::set_namestruct RecordOwned,fn Record::to_ownedstruct ThreadPoolImprovements / Bug Fixes
FullFormatternow output terminal-friendly source file full path.Now leap seconds will be handled and displayed correctly.
Re-exported some items from
logcrate to a new modulelog_cratefor convenience.Public APIs have been marked with
#[must_use]attribute if appropriate.Now if an invalid
rotation_policyis used to constructRotatingFileSink, an error will be returned instead of panic.Breaking Changes
fn LoggerBuilder::buildnow returnsResult<Logger>instead of panic.struct RecordBuilderandfn Record::neware removed.WinDebugSinkis now only enabled when featurenativeis enabledtrait Sinkadded a new methodset_error_handlerand removed methodswap_formatter.trait Formatteradded a new methodclone_box.All error types are moved into a new module
error.Deprecated methods
{LoggerBuilder, StyleBuilder, StdStreamSink, FileSink, RotatingFileSink, WinDebugSink, Style}::new, use Builder methods instead.Others
This discussion was created from the release v0.3.0.
Beta Was this translation helpful? Give feedback.
All reactions