Skip to content

v0.3.0

Compare
Choose a tag to compare
@SpriteOvO SpriteOvO released this 08 Nov 13:58
· 66 commits to main since this release

Highlights

  • Performance is improved by 45% (see Benchmarks).

  • PatternFormatter with pattern! macro allows users to configure logging format using a literal string at compile-time. (#12, much appreciated @Lancern)

  • AsyncPoolSink can be combined with any sink to process log records asynchronously (non-blocking).

New Features

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 module log_crate for convenience.

  • Public APIs have been marked with #[must_use] attribute if appropriate.

  • Now if an invalid rotation_policy is used to construct RotatingFileSink, an error will be returned instead of panic.

Breaking Changes

  • fn LoggerBuilder::build now returns Result<Logger> instead of panic.

  • struct RecordBuilder and fn Record::new are removed.

  • WinDebugSink is now only enabled when feature native is enabled

  • trait Sink added a new method set_error_handler and removed method swap_formatter.

  • trait Formatter added a new method clone_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

  • Since this release, MSRV (the minimum supported Rust version) will be guaranteed and maintained. Currently it is 1.56.