Skip to content

Commit

Permalink
see ya!
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Oct 10, 2020
1 parent 341a30a commit f9b5f0c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 101 deletions.
32 changes: 0 additions & 32 deletions tracing-core/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,38 +714,6 @@ impl Dispatch {
self.collector().clone_span(&id)
}

/// Notifies the collector that a [span ID] has been dropped.
///
/// This function must only be called with span IDs that were returned by
/// this `Dispatch`'s [`new_span`] function. The `tracing` crate upholds
/// this guarantee and any other libraries implementing instrumentation APIs
/// must as well.
///
/// This calls the [`drop_span`] function on the [`Collector`] that this
/// `Dispatch` forwards to.
///
/// <div class="information">
/// <div class="tooltip compile_fail" style="">&#x26a0; &#xfe0f;<span class="tooltiptext">Warning</span></div>
/// </div>
/// <div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
///
/// **Deprecated**: The [`try_close`] method is functionally identical, but returns `true` if the span is now closed.
/// It should be used instead of this method.
///
/// </pre></div>
///
/// [span ID]: super::span::Id
/// [`Collector`]: super::collector::Collector
/// [`drop_span`]: super::collector::Collector::drop_span
/// [`new_span`]: super::collector::Collector::new_span
/// [`try_close`]: Self::try_close
#[inline]
#[deprecated(since = "0.1.2", note = "use `Dispatch::try_close` instead")]
pub fn drop_span(&self, id: span::Id) {
#[allow(deprecated)]
self.collector().drop_span(id);
}

/// Notifies the collector that a [span ID] has been dropped, and returns
/// `true` if there are now 0 IDs referring to that span.
///
Expand Down
47 changes: 0 additions & 47 deletions tracing-subscriber/src/fmt/fmt_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,34 +71,7 @@ pub struct Subscriber<
_inner: PhantomData<S>,
}

/// A builder for [`Subscriber`](struct.Subscriber.html) that logs formatted representations of `tracing`
/// events and spans.
///
/// **Note**: As of `tracing-subscriber` 0.2.4, the separate builder type is now
/// deprecated, as the `Subscriber` type itself supports all the builder's
/// configuration methods. This is now an alias for `Subscriber`.
#[deprecated(
since = "0.2.4",
note = "a separate layer builder type is not necessary, `Subscriber`s now support configuration"
)]
pub type LayerBuilder<
S,
N = format::DefaultFields,
E = format::Format<format::Full>,
W = fn() -> io::Stdout,
> = Subscriber<S, N, E, W>;

impl<S> Subscriber<S> {
/// Returns a new [`LayerBuilder`](type.LayerBuilder.html) for configuring a `Subscriber`.
#[deprecated(
since = "0.2.4",
note = "a separate layer builder is not necessary, use `Subscriber::new`/`Subscriber::default` instead"
)]
#[allow(deprecated)]
pub fn builder() -> LayerBuilder<S> {
Subscriber::default()
}

/// Returns a new [`Subscriber`](struct.Subscriber.html) with the default configuration.
pub fn new() -> Self {
Self::default()
Expand Down Expand Up @@ -470,26 +443,6 @@ impl<S, N, E, W> Subscriber<S, N, E, W> {
}
}

#[allow(deprecated)]
impl<S, N, E, W> LayerBuilder<S, N, E, W>
where
S: Collector + for<'a> LookupSpan<'a>,
N: for<'writer> FormatFields<'writer> + 'static,
E: FormatEvent<S, N> + 'static,
W: MakeWriter + 'static,
{
/// Builds a [`Subscriber`] with the provided configuration.
///
/// [`Subscriber`]: struct.Subscriber.html
#[deprecated(
since = "0.2.4",
note = "`LayerBuilder` is no longer a separate type; this method is not necessary"
)]
pub fn finish(self) -> Subscriber<S, N, E, W> {
self
}
}

impl<S> Default for Subscriber<S> {
fn default() -> Self {
Subscriber {
Expand Down
22 changes: 0 additions & 22 deletions tracing-subscriber/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ mod fmt_subscriber;
pub mod format;
pub mod time;
pub mod writer;
#[allow(deprecated)]
pub use fmt_subscriber::LayerBuilder;
pub use fmt_subscriber::{FmtContext, FormattedFields, Subscriber};

use crate::subscriber::Subscriber as _;
Expand Down Expand Up @@ -827,26 +825,6 @@ impl<N, E, F, W> CollectorBuilder<N, E, F, W> {
}
}

/// Sets whether or not spans inherit their parents' field values (disabled
/// by default).
#[deprecated(since = "0.2.0", note = "this no longer does anything")]
pub fn inherit_fields(self, inherit_fields: bool) -> Self {
let _ = inherit_fields;
self
}

/// Sets the function that the subscriber being built should use to format
/// events that occur.
#[deprecated(since = "0.2.0", note = "renamed to `event_format`.")]
pub fn on_event<E2>(self, fmt_event: E2) -> CollectorBuilder<N, E2, F, W>
where
E2: FormatEvent<Registry, N> + 'static,
N: for<'writer> FormatFields<'writer> + 'static,
W: MakeWriter + 'static,
{
self.event_format(fmt_event)
}

/// Sets the [`MakeWriter`] that the subscriber being built will use to write events.
///
/// # Examples
Expand Down

0 comments on commit f9b5f0c

Please sign in to comment.