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
-
Highlights
Performance is improved by 45% (see Benchmarks).
PatternFormatter
withpattern!
macro allows users to configure logging format using a literal string at compile-time.AsyncPoolSink
can be combined with any sink to process log records asynchronously (non-blocking).New Features
JournaldSink
writes log records tosystemd-journal
. (linux
targets only)WriteSink
writes log records to any object that implementsWrite
trait.All sinks have now implemented
Builder
structs, 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_from
allows 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_name
struct RecordOwned
,fn Record::to_owned
struct ThreadPool
Improvements / Bug Fixes
FullFormatter
now output terminal-friendly source file full path.Now leap seconds will be handled and displayed correctly.
Re-exported some items from
log
crate to a new modulelog_crate
for convenience.Public APIs have been marked with
#[must_use]
attribute if appropriate.Now if an invalid
rotation_policy
is used to constructRotatingFileSink
, an error will be returned instead of panic.Breaking Changes
fn LoggerBuilder::build
now returnsResult<Logger>
instead of panic.struct RecordBuilder
andfn Record::new
are removed.WinDebugSink
is now only enabled when featurenative
is enabledtrait Sink
added a new methodset_error_handler
and removed methodswap_formatter
.trait Formatter
added 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