Skip to content

Commit

Permalink
subscriber: revert "subscriber: update time crate to 0.3.18 (#2550)"
Browse files Browse the repository at this point in the history
This reverts commit 9744ec0. This
change breaks MSRV compatibility, and was accidentally auto-merged due
to what appears to be an issue with the CI configuration, which
(apparently) doesn't require the MSRV minimal-versions check runs to
complete before allowing a branch to merge.

We'll have to solve the original issue here through documentation for
now. See [this comment] for details.

[this comment]: #2550 (comment)
  • Loading branch information
hawkw committed Apr 13, 2023
1 parent 539ffbe commit a351b97
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracing-subscriber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ once_cell = { optional = true, version = "1.13.0" }
# fmt
tracing-log = { path = "../tracing-log", version = "0.2", optional = true, default-features = false, features = ["log-tracer", "std"] }
nu-ansi-term = { version = "0.46.0", optional = true }
time = { version = "0.3.18", features = ["formatting"], optional = true }
time = { version = "0.3.2", features = ["formatting"], optional = true }

# only required by the json feature
serde_json = { version = "1.0.82", optional = true }
Expand All @@ -73,7 +73,7 @@ regex = { version = "1.6.0", default-features = false, features = ["std"] }
tracing-futures = { path = "../tracing-futures", version = "0.3", default-features = false, features = ["std-future", "std"] }
tokio = { version = "1.20.0", features = ["rt", "macros"] }
# Enable the `time` crate's `macros` feature, for examples.
time = { version = "0.3.18", features = ["formatting", "macros"] }
time = { version = "0.3.2", features = ["formatting", "macros"] }

[badges]
maintenance = { status = "experimental" }
Expand Down
24 changes: 24 additions & 0 deletions tracing-subscriber/src/fmt/time/time_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ use time::{format_description::well_known, formatting::Formattable, OffsetDateTi
///
/// To format the current [UTC time] instead, use the [`UtcTime`] type.
///
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="compile_fail" style="white-space:normal;font:inherit;">
/// <strong>Warning</strong>: The <a href = "https://docs.rs/time/0.3/time/"><code>time</code>
/// crate</a> must be compiled with <code>--cfg unsound_local_offset</code> in order to use
/// local timestamps. When this cfg is not enabled, local timestamps cannot be recorded, and
/// events will be logged without timestamps.
///
/// See the <a href="https://docs.rs/time/0.3.4/time/#feature-flags"><code>time</code>
/// documentation</a> for more details.
/// </pre></div>
///
/// [local time]: https://docs.rs/time/0.3/time/struct.OffsetDateTime.html#method.now_local
/// [UTC time]: https://docs.rs/time/0.3/time/struct.OffsetDateTime.html#method.now_utc
/// [formatter]: https://docs.rs/time/0.3/time/formatting/trait.Formattable.html
Expand Down Expand Up @@ -65,6 +76,19 @@ impl<F: Formattable> LocalTime<F> {
/// [`time` crate] with the provided provided format. The format may be any
/// type that implements the [`Formattable`] trait.
///
///
/// <div class="example-wrap" style="display:inline-block">
/// <pre class="compile_fail" style="white-space:normal;font:inherit;">
/// <strong>Warning</strong>: The <a href = "https://docs.rs/time/0.3/time/">
/// <code>time</code> crate</a> must be compiled with <code>--cfg
/// unsound_local_offset</code> in order to use local timestamps. When this
/// cfg is not enabled, local timestamps cannot be recorded, and
/// events will be logged without timestamps.
///
/// See the <a href="https://docs.rs/time/0.3.4/time/#feature-flags">
/// <code>time</code> documentation</a> for more details.
/// </pre></div>
///
/// Typically, the format will be a format description string, or one of the
/// `time` crate's [well-known formats].
///
Expand Down

0 comments on commit a351b97

Please sign in to comment.