Skip to content

Commit

Permalink
docs: remove usage of 0.2 terminology (#2728)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky authored and hawkw committed Oct 1, 2023
1 parent af66aed commit 7f0cc09
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion examples/examples/fmt-compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/examples/fmt-source-locations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tracing-core/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/filter/env/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
Expand Down
8 changes: 4 additions & 4 deletions tracing-subscriber/src/filter/layer_filters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down
48 changes: 24 additions & 24 deletions tracing-subscriber/src/fmt/time/time_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`]:
Expand All @@ -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`
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand All @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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`]:
Expand All @@ -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`
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/layer/layered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions tracing-subscriber/src/layer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f0cc09

Please sign in to comment.