summaryrefslogtreecommitdiffstats
path: root/vendor/tracing/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/tracing/src')
-rw-r--r--vendor/tracing/src/lib.rs6
-rw-r--r--vendor/tracing/src/span.rs18
-rw-r--r--vendor/tracing/src/subscriber.rs17
3 files changed, 23 insertions, 18 deletions
diff --git a/vendor/tracing/src/lib.rs b/vendor/tracing/src/lib.rs
index 4743eba20..7d60c7721 100644
--- a/vendor/tracing/src/lib.rs
+++ b/vendor/tracing/src/lib.rs
@@ -743,6 +743,7 @@
//! - [`tracing-forest`] provides a subscriber that preserves contextual coherence by
//! grouping together logs from the same spans during writing.
//! - [`tracing-loki`] provides a layer for shipping logs to [Grafana Loki].
+//! - [`tracing-logfmt`] provides a layer that formats events and spans into the logfmt format.
//!
//! If you're the maintainer of a `tracing` ecosystem crate not listed above,
//! please let us know! We'd love to add your project to the list!
@@ -779,6 +780,7 @@
//! [`tracing-forest`]: https://crates.io/crates/tracing-forest
//! [`tracing-loki`]: https://crates.io/crates/tracing-loki
//! [Grafana Loki]: https://grafana.com/oss/loki/
+//! [`tracing-logfmt`]: https://crates.io/crates/tracing-logfmt
//!
//! <pre class="ignore" style="white-space:normal;font:inherit;">
//! <strong>Note</strong>: Some of these ecosystem crates are currently
@@ -809,7 +811,7 @@
//!
//! ```toml
//! [dependencies]
-//! tracing = { version = "0.1.35", default-features = false }
+//! tracing = { version = "0.1.36", default-features = false }
//! ```
//!
//! <pre class="ignore" style="white-space:normal;font:inherit;">
@@ -892,7 +894,7 @@
//! [flags]: #crate-feature-flags
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg), deny(rustdoc::broken_intra_doc_links))]
-#![doc(html_root_url = "https://docs.rs/tracing/0.1.35")]
+#![doc(html_root_url = "https://docs.rs/tracing/0.1.36")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png",
issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/"
diff --git a/vendor/tracing/src/span.rs b/vendor/tracing/src/span.rs
index 21358eb27..58822f4d9 100644
--- a/vendor/tracing/src/span.rs
+++ b/vendor/tracing/src/span.rs
@@ -1136,7 +1136,7 @@ impl Span {
///
/// // Now, record a value for parting as well.
/// // (note that the field name is passed as a string slice)
- /// span.record("parting", &"goodbye world!");
+ /// span.record("parting", "goodbye world!");
/// ```
/// However, it may also be used to record a _new_ value for a field whose
/// value was already recorded:
@@ -1154,7 +1154,7 @@ impl Span {
/// }
/// Err(_) => {
/// // Things are no longer okay!
- /// span.record("is_okay", &false);
+ /// span.record("is_okay", false);
/// }
/// }
/// ```
@@ -1181,17 +1181,17 @@ impl Span {
/// // Now, you try to record a value for a new field, `new_field`, which was not
/// // declared as `Empty` or populated when you created `span`.
/// // You won't get any error, but the assignment will have no effect!
- /// span.record("new_field", &"interesting_value_you_really_need");
+ /// span.record("new_field", "interesting_value_you_really_need");
///
/// // Instead, all fields that may be recorded after span creation should be declared up front,
/// // using field::Empty when a value is not known, as we did for `parting`.
/// // This `record` call will indeed replace field::Empty with "you will be remembered".
- /// span.record("parting", &"you will be remembered");
+ /// span.record("parting", "you will be remembered");
/// ```
///
/// [`field::Empty`]: super::field::Empty
/// [`Metadata`]: super::Metadata
- pub fn record<Q: ?Sized, V>(&self, field: &Q, value: &V) -> &Self
+ pub fn record<Q: ?Sized, V>(&self, field: &Q, value: V) -> &Self
where
Q: field::AsField,
V: field::Value,
@@ -1201,7 +1201,7 @@ impl Span {
self.record_all(
&meta
.fields()
- .value_set(&[(&field, Some(value as &dyn field::Value))]),
+ .value_set(&[(&field, Some(&value as &dyn field::Value))]),
);
}
}
@@ -1614,4 +1614,10 @@ mod test {
impl AssertSync for Span {}
impl AssertSync for Entered<'_> {}
impl AssertSync for EnteredSpan {}
+
+ #[test]
+ fn test_record_backwards_compat() {
+ Span::current().record("some-key", &"some text");
+ Span::current().record("some-key", &false);
+ }
}
diff --git a/vendor/tracing/src/subscriber.rs b/vendor/tracing/src/subscriber.rs
index 343dc5914..f55698d13 100644
--- a/vendor/tracing/src/subscriber.rs
+++ b/vendor/tracing/src/subscriber.rs
@@ -5,12 +5,12 @@ pub use tracing_core::subscriber::*;
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub use tracing_core::dispatcher::DefaultGuard;
-/// Sets this subscriber as the default for the duration of a closure.
+/// Sets this [`Subscriber`] as the default for the current thread for the
+/// duration of a closure.
///
/// The default subscriber is used when creating a new [`Span`] or
-/// [`Event`], _if no span is currently executing_. If a span is currently
-/// executing, new spans or events are dispatched to the subscriber that
-/// tagged that span, instead.
+/// [`Event`].
+///
///
/// [`Span`]: super::span::Span
/// [`Subscriber`]: super::subscriber::Subscriber
@@ -43,13 +43,10 @@ where
crate::dispatcher::set_global_default(crate::Dispatch::new(subscriber))
}
-/// Sets the subscriber as the default for the duration of the lifetime of the
-/// returned [`DefaultGuard`]
+/// Sets the [`Subscriber`] as the default for the current thread for the
+/// duration of the lifetime of the returned [`DefaultGuard`].
///
-/// The default subscriber is used when creating a new [`Span`] or
-/// [`Event`], _if no span is currently executing_. If a span is currently
-/// executing, new spans or events are dispatched to the subscriber that
-/// tagged that span, instead.
+/// The default subscriber is used when creating a new [`Span`] or [`Event`].
///
/// [`Span`]: super::span::Span
/// [`Subscriber`]: super::subscriber::Subscriber