mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 07:20:35 +00:00
docs: remove usage of 0.2 terminology (#2728)
This commit is contained in:
parent
af66aed83e
commit
7f0cc09d0b
@ -7,7 +7,7 @@ fn main() {
|
||||
.compact()
|
||||
// enable everything
|
||||
.with_max_level(tracing::Level::TRACE)
|
||||
// sets this to be the default, global collector for this application.
|
||||
// sets this to be the default, global subscriber for this application.
|
||||
.init();
|
||||
|
||||
let number_of_yaks = 3;
|
||||
|
@ -14,7 +14,7 @@ fn main() {
|
||||
.with_line_number(true)
|
||||
// disable targets
|
||||
.with_target(false)
|
||||
// sets this to be the default, global collector for this application.
|
||||
// sets this to be the default, global subscriber for this application.
|
||||
.init();
|
||||
|
||||
let number_of_yaks = 3;
|
||||
|
@ -518,8 +518,8 @@ impl Dispatch {
|
||||
}
|
||||
}
|
||||
|
||||
/// Registers a new callsite with this collector, returning whether or not
|
||||
/// the collector is interested in being notified about the callsite.
|
||||
/// Registers a new callsite with this subscriber, returning whether or not
|
||||
/// the subscriber is interested in being notified about the callsite.
|
||||
///
|
||||
/// This calls the [`register_callsite`] function on the [`Subscriber`]
|
||||
/// that this `Dispatch` forwards to.
|
||||
|
2
tracing-subscriber/src/filter/env/builder.rs
vendored
2
tracing-subscriber/src/filter/env/builder.rs
vendored
@ -212,7 +212,7 @@ impl Builder {
|
||||
#[cfg(feature = "nu_ansi_term")]
|
||||
use nu_ansi_term::{Color, Style};
|
||||
// NOTE: We can't use a configured `MakeWriter` because the EnvFilter
|
||||
// has no knowledge of any underlying subscriber or collector, which
|
||||
// has no knowledge of any underlying subscriber or subscriber, which
|
||||
// may or may not use a `MakeWriter`.
|
||||
let warn = |msg: &str| {
|
||||
#[cfg(not(feature = "nu_ansi_term"))]
|
||||
|
@ -694,7 +694,7 @@ impl<L, F, S> Filtered<L, F, S> {
|
||||
/// # }
|
||||
/// ```
|
||||
///
|
||||
/// [subscriber]: Subscribe
|
||||
/// [`Layer`]: crate::layer::Layer
|
||||
pub fn inner_mut(&mut self) -> &mut L {
|
||||
&mut self.layer
|
||||
}
|
||||
@ -706,8 +706,8 @@ where
|
||||
F: layer::Filter<S> + 'static,
|
||||
L: Layer<S>,
|
||||
{
|
||||
fn on_register_dispatch(&self, collector: &Dispatch) {
|
||||
self.layer.on_register_dispatch(collector);
|
||||
fn on_register_dispatch(&self, subscriber: &Dispatch) {
|
||||
self.layer.on_register_dispatch(subscriber);
|
||||
}
|
||||
|
||||
fn on_layer(&mut self, subscriber: &mut S) {
|
||||
@ -1190,7 +1190,7 @@ impl FilterState {
|
||||
}
|
||||
}
|
||||
|
||||
/// Run a second filtering pass, e.g. for Subscribe::event_enabled.
|
||||
/// Run a second filtering pass, e.g. for Layer::event_enabled.
|
||||
fn and(&self, filter: FilterId, f: impl FnOnce() -> bool) -> bool {
|
||||
let map = self.enabled.get();
|
||||
let enabled = map.is_enabled(filter) && f();
|
||||
|
@ -76,9 +76,9 @@ impl LocalTime<well_known::Rfc3339> {
|
||||
/// ```
|
||||
/// use tracing_subscriber::fmt::{self, time};
|
||||
///
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(time::LocalTime::rfc_3339());
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// [local time]: time::OffsetDateTime::now_local
|
||||
@ -130,9 +130,9 @@ impl<F: Formattable> LocalTime<F> {
|
||||
/// use time::macros::format_description;
|
||||
///
|
||||
/// let timer = LocalTime::new(format_description!("[hour]:[minute]:[second]"));
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using [`time::format_description::parse`]:
|
||||
@ -143,9 +143,9 @@ impl<F: Formattable> LocalTime<F> {
|
||||
/// let time_format = time::format_description::parse("[hour]:[minute]:[second]")
|
||||
/// .expect("format string should be valid!");
|
||||
/// let timer = LocalTime::new(time_format);
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using the [`format_description!`] macro requires enabling the `time`
|
||||
@ -158,9 +158,9 @@ impl<F: Formattable> LocalTime<F> {
|
||||
/// use tracing_subscriber::fmt::{self, time::LocalTime};
|
||||
///
|
||||
/// let timer = LocalTime::new(time::format_description::well_known::Rfc3339);
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// [local time]: time::OffsetDateTime::now_local()
|
||||
@ -207,9 +207,9 @@ impl UtcTime<well_known::Rfc3339> {
|
||||
/// ```
|
||||
/// use tracing_subscriber::fmt::{self, time};
|
||||
///
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(time::UtcTime::rfc_3339());
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// [local time]: time::OffsetDateTime::now_utc
|
||||
@ -247,9 +247,9 @@ impl<F: Formattable> UtcTime<F> {
|
||||
/// use time::macros::format_description;
|
||||
///
|
||||
/// let timer = UtcTime::new(format_description!("[hour]:[minute]:[second]"));
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using the [`format_description!`] macro requires enabling the `time`
|
||||
@ -263,9 +263,9 @@ impl<F: Formattable> UtcTime<F> {
|
||||
/// let time_format = time::format_description::parse("[hour]:[minute]:[second]")
|
||||
/// .expect("format string should be valid!");
|
||||
/// let timer = UtcTime::new(time_format);
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using a [well-known format][well-known formats] (this is equivalent to
|
||||
@ -275,9 +275,9 @@ impl<F: Formattable> UtcTime<F> {
|
||||
/// use tracing_subscriber::fmt::{self, time::UtcTime};
|
||||
///
|
||||
/// let timer = UtcTime::new(time::format_description::well_known::Rfc3339);
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// [UTC time]: time::OffsetDateTime::now_utc()
|
||||
@ -326,9 +326,9 @@ impl OffsetTime<well_known::Rfc3339> {
|
||||
/// ```
|
||||
/// use tracing_subscriber::fmt::{self, time};
|
||||
///
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(time::OffsetTime::local_rfc_3339().expect("could not get local offset!"));
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using `OffsetTime` with Tokio:
|
||||
@ -398,9 +398,9 @@ impl<F: time::formatting::Formattable> OffsetTime<F> {
|
||||
///
|
||||
/// let offset = UtcOffset::current_local_offset().expect("should get local offset!");
|
||||
/// let timer = OffsetTime::new(offset, format_description!("[hour]:[minute]:[second]"));
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using [`time::format_description::parse`]:
|
||||
@ -413,9 +413,9 @@ impl<F: time::formatting::Formattable> OffsetTime<F> {
|
||||
/// let time_format = time::format_description::parse("[hour]:[minute]:[second]")
|
||||
/// .expect("format string should be valid!");
|
||||
/// let timer = OffsetTime::new(offset, time_format);
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// Using the [`format_description!`] macro requires enabling the `time`
|
||||
@ -430,9 +430,9 @@ impl<F: time::formatting::Formattable> OffsetTime<F> {
|
||||
///
|
||||
/// let offset = UtcOffset::current_local_offset().expect("should get local offset!");
|
||||
/// let timer = OffsetTime::new(offset, time::format_description::well_known::Rfc3339);
|
||||
/// let collector = tracing_subscriber::fmt()
|
||||
/// let subscriber = tracing_subscriber::fmt()
|
||||
/// .with_timer(timer);
|
||||
/// # drop(collector);
|
||||
/// # drop(subscriber);
|
||||
/// ```
|
||||
///
|
||||
/// [`time` crate]: time
|
||||
|
@ -470,7 +470,7 @@ where
|
||||
return Interest::sometimes();
|
||||
}
|
||||
|
||||
// otherwise, allow the inner subscriber or collector to weigh in.
|
||||
// otherwise, allow the inner subscriber or subscriber to weigh in.
|
||||
inner
|
||||
}
|
||||
|
||||
|
@ -750,8 +750,8 @@ where
|
||||
/// [`WeakDispatch`]: tracing_core::dispatcher::WeakDispatch
|
||||
/// [upgraded]: tracing_core::dispatcher::WeakDispatch::upgrade
|
||||
/// [`Subscriber`]: tracing_core::Subscriber
|
||||
fn on_register_dispatch(&self, collector: &Dispatch) {
|
||||
let _ = collector;
|
||||
fn on_register_dispatch(&self, subscriber: &Dispatch) {
|
||||
let _ = subscriber;
|
||||
}
|
||||
|
||||
/// Performs late initialization when attaching a `Layer` to a
|
||||
|
Loading…
x
Reference in New Issue
Block a user