Update Rust crate log to 0.4 - autoclosed #584
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.3
->0.4
Release Notes
rust-lang/log (log)
v0.4.22
Compare Source
v0.4.21
Compare Source
v0.4.20
Compare Source
local_inner_macros
usage by @EFanZh in https://github.com/rust-lang/log/pull/570v0.4.19
Compare Source
v0.4.18
Compare Source
set_max_level_racy
and gateset_max_level
by @djkoloski in https://github.com/rust-lang/log/pull/544v0.4.17
kv_unstable
internal dependencies.v0.4.16
Option
use in macros.v0.4.15
Compare Source
spin_loop_hint
.set_max_level
call.Log
on some common wrapper types.log!
macros.kv_unstable
internal dependencies so they don't bump past their current alpha.kv_unstable
.NonZero*
integers as values in structured loggingv0.4.14
Compare Source
__private_api_log_lit
special case.kv_unstable
andstd
features causing compile failures.Value::to_*
conversions that were incorrectly usingas
.Value::to_error
toValue::to_borrowed_error
.v0.4.13
Compare Source
0.4.11
, except with akv_unstable_std
feature added to aid migrating current dependents to0.4.14
(which was originally going to be0.4.13
until it was decided to create a patch from0.4.11
to minimize disruption).v0.4.12
Compare Source
New
Log
forBox<T: Log>
cfg-if
to1.0
Fill
APIand added
source::as_map
andsource::as_list
to easily serialize aSource
as either a map of
{key: value, ..}
or as a list of[(key, value), ..]
.Fixed
LevelFilter
to use theiru64
index variantsv0.4.11
Compare Source
New
win_dbg_logger
in the readme.Fixed
v0.4.10
Compare Source
Fixed
log!
macros so they work in expression context (this regressed in0.4.9
, which has been yanked).v0.4.9
Compare Source
Minimum Supported Rust Version
This release bumps the minimum compiler version to
1.31.0
. This was mainly needed forcfg-if
,but between
1.16.0
and1.31.0
there are a lot of language and library improvements we nowtake advantage of.
New
log!
macrosImproved
v0.4.8
Compare Source
New
Record
fields as static strings.v0.4.7
Compare Source
New
kv_unstable
feature gate. This new API doesn't affect existing users and may change in future
patches (so those changes may not appear in the changelog until it stabilizes).
Improved
log
with the 2018 edition.v0.4.6
Compare Source
Improved
log_enabled!
macro.v0.4.5
Compare Source
Improved
log
's internal helper macros less likely to conflict with user-definedmacros.
v0.4.4
Compare Source
Improved
v0.4.3
Compare Source
Improved
v0.4.2
Compare Source
v0.4.1
Compare Source
v0.4.0
Compare Source
The changes in this release include cleanup of some obscure functionality and a more robust public
API designed to support bridges to other logging systems, and provide more flexibility to new
features in the future.
Compatibility
Vast portions of the Rust ecosystem use the 0.3.x release series of log, and we don't want to force
the community to go through the pain of upgrading every crate to 0.4.x at the exact same time. Along
with 0.4.0, we've published a new 0.3.9 release which acts as a "shim" over 0.4.0. This will allow
crates using either version to coexist without losing messages from one side or the other.
There is one caveat - a log message generated by a crate using 0.4.x but consumed by a logging
implementation using 0.3.x will not have a file name or module path. Applications affected by this
can upgrade their logging implementations to one using 0.4.x to avoid losing this information. The
other direction does not lose any information, fortunately!
TL;DR Libraries should feel comfortable upgrading to 0.4.0 without treating that as a breaking
change. Applications may need to update their logging implementation (e.g. env-logger) to a newer
version using log 0.4.x to avoid losing module and file information.
New
no_std
by default.Level
andLevelFilter
now implementSerialize
andDeserialize
when theserde
feature isenabled.
Record
andMetadata
types can now be constructed by third-party code via a builder API.logger
free function returns a reference to the logger implementation. This, along with theability to construct
Record
s, makes it possible to bridge from another logging framework tothis one without digging into the private internals of the crate. The standard
error!
warn!
,etc, macros now exclusively use the public API of the crate rather than "secret" internal APIs.
Log::flush
has been added to allow crates to tell the logging implementation to ensure that all"in flight" log events have been persisted. This can be used, for example, just before an
application exits to ensure that asynchronous log sinks finish their work.
Removed
shutdown
andshutdown_raw
functions have been removed. Supporting shutdown significantlycomplicated the implementation and imposed a performance cost on each logging operation.
log_panics
function and its associatednightly
Cargo feature have been removed. Use thelog-panics instead.
Changed
Log
prefix has been removed from type names. For example,LogLevelFilter
is nowLevelFilter
, andLogRecord
is nowRecord
.MaxLogLevelFilter
object has been removed in favor of aset_max_level
free function.set_logger
free functions have been restructured. The logger is now directly passed to thefunctions rather than a closure which returns the logger.
set_logger
now takes a&'static Log
and is usable inno_std
contexts in place of the oldset_logger_raw
.set_boxed_logger
is a convenience function which takes a
Box<Log>
but otherwise acts likeset_logger
. Itrequires the
std
feature.file
andmodule_path
values inRecord
no longer have the'static
lifetime to supportintegration with other logging frameworks that don't provide a
'static
lifetime for theequivalent values.
file
,line
, andmodule_path
values inRecord
are nowOption
s to support integrationwith other logging frameworks that don't provide those values.
In the Future
information in a log event in addition to the normal string message. This should be able to be
added in a backwards compatible manner to the 0.4.x series when the design is worked out.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.