Releases: SpriteOvO/spdlog-rs
v0.3.2
v0.3.1
v0.3.0
Highlights
-
Performance is improved by 45% (see Benchmarks).
-
PatternFormatter
withpattern!
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
-
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. (#15) -
More new items:
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 enabled -
trait 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
- Since this release, MSRV (the minimum supported Rust version) will be guaranteed and maintained. Currently it is 1.56.
v0.2.4
This release contains a very important bug fix that solved the issue which caused log record loses when program exits or panics. Everyone should upgrade to this version to make sure all your log records are properly logged.
Changes:
- Flush the default logger once at exit.
v0.2.3
Changes:
- Attempt to enable terminal ANSI escape sequences on Windows. This makes CMD and PowerShell support color output.
- Implemented
From<log::LevelFilter>
forLevelFilter
enum. - Documented missing crate features
level-critical
andrelease-level-critical
.
v0.2.2
v0.2.1
v0.2.0
Normal changes:
- Added a sink
WinDebugSink
. - Added feature
log
, structLogCrateProxy
, functioninit_log_crate_proxy
and functionlog_crate_proxy
to be compatible withlog
crate. - Allowed to configure level filters of loggers via environment variable
SPDLOG_RS_LEVEL
. - Implemented
AsRef<OsStr>
forFlexibleString
. - Extracted
FlexibleString
to a separate crate flexible-string.
Breaking changes:
Logger
struct removednew
function andDefault
trait.Logger::sinks
method returns slice instead ofVec
reference.- Logger names no longer allow any of these characters:
,
=
*
?
$
{
}
"
'
, and cannot start or end with a whitespace. - Marked
non_exhaustive
attribute forError
enum.
v0.1.1
Normal changes:
- Added a sink
WinDebugSink
. - Allowed to configure level filters of loggers via environment variable
SPDLOG_RS_LEVEL
. - Implemented
AsRef<OsStr>
forFlexibleString
. - Extracted
FlexibleString
to a separate crate flexible-string.
Breaking changes:
Logger
struct removednew
function andDefault
trait.- Logger names no longer allow any of these characters:
,
=
*
?
$
{
}
"
'
, and cannot start or end with a whitespace. - Marked
non_exhaustive
attribute forError
enum.
Known issues:
- This release has breaking changes that do not respect the SemVer Compatibility of Cargo. You may consider switching to v0.2.