Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscriber: document time's --cfg unsound_local_offset #1699

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Nov 3, 2021

Motivation

The time crate must be compiled with --cfg unsound_local_offset in
order for local timestamps to be enabled. For users whose first exposure
to the time crate's API is via tracing-subscriber's time timestamp
formatters, this is potentially very surprising! Therefore, although
this cfg is not part of tracing's API surface, we should probably
document this aspect of time's API in the
tracing-subscriber::fmt::time documentation.

Solution

This branch adds warnings in the time::LocalTime type's API docs, in
the struct-level documentation and on the new constructor, describing
that --cfg unsound_local_offset is necessary to record local
timestamps and referring users to the time documentation. I also added
unsound_local_offset to the doc(cfg(...)) attributes for the
LocalTime type.

While I was changing tracing-subscriber's docs, I also fixed a couple
formatting issues I noticed.

Fixes #1688

## Motivation

The `time` crate must be compiled with `--cfg unsound_local_offset` in
order for local timestamps to be enabled. For users whose first exposure
to the `time` crate's API is via `tracing-subscriber`'s `time` timestamp
formatters, this is potentially _very_ surprising! Therefore, although
this cfg is not part of `tracing`'s API surface, we should probably
document this aspect of `time`'s API in the
`tracing-subscriber::fmt::time` documentation.

## Solution

This branch adds warnings in the `time::LocalTime` type's API docs, in
the struct-level documentation and on the `new` constructor, describing
that `--cfg unsound_local_offset` is necessary to record local
timestamps and referring users to the `time` documentation. I also added
`unsound_local_offset` to the `doc(cfg(...))` attributes for the
`LocalTime` type.

While I was changing `tracing-subscriber`'s docs, I also fixed a couple
formatting issues I noticed.

Fixes #1688
@hawkw hawkw requested review from davidbarsky and a team as code owners November 3, 2021 17:06
@hawkw hawkw merged commit 8d4d5ac into master Nov 3, 2021
@hawkw hawkw deleted the eliza/unsound-local-offset branch November 3, 2021 17:31
@lilyball
Copy link
Contributor

lilyball commented Nov 6, 2021

This looks great, thanks! My only quibble is that the cfg flag is only necessary on unix and is not necessary on Windows.

hawkw added a commit that referenced this pull request Dec 1, 2021
## Motivation

The `time` crate must be compiled with `--cfg unsound_local_offset` in
order for local timestamps to be enabled. For users whose first exposure
to the `time` crate's API is via `tracing-subscriber`'s `time` timestamp
formatters, this is potentially _very_ surprising! Therefore, although
this cfg is not part of `tracing`'s API surface, we should probably
document this aspect of `time`'s API in the
`tracing-subscriber::fmt::time` documentation.

## Solution

This branch adds warnings in the `time::LocalTime` type's API docs, in
the struct-level documentation and on the `new` constructor, describing
that `--cfg unsound_local_offset` is necessary to record local
timestamps and referring users to the `time` documentation. I also added
`unsound_local_offset` to the `doc(cfg(...))` attributes for the
`LocalTime` type.

While I was changing `tracing-subscriber`'s docs, I also fixed a couple
formatting issues I noticed.

Fixes #1688
hawkw added a commit that referenced this pull request Dec 1, 2021
## Motivation

The `time` crate must be compiled with `--cfg unsound_local_offset` in
order for local timestamps to be enabled. For users whose first exposure
to the `time` crate's API is via `tracing-subscriber`'s `time` timestamp
formatters, this is potentially _very_ surprising! Therefore, although
this cfg is not part of `tracing`'s API surface, we should probably
document this aspect of `time`'s API in the
`tracing-subscriber::fmt::time` documentation.

## Solution

This branch adds warnings in the `time::LocalTime` type's API docs, in
the struct-level documentation and on the `new` constructor, describing
that `--cfg unsound_local_offset` is necessary to record local
timestamps and referring users to the `time` documentation. I also added
`unsound_local_offset` to the `doc(cfg(...))` attributes for the
`LocalTime` type.

While I was changing `tracing-subscriber`'s docs, I also fixed a couple
formatting issues I noticed.

Fixes #1688
hawkw added a commit that referenced this pull request Dec 23, 2021
# 0.3.4 (Dec 23, 2021)

This release contains bugfixes for the `fmt` module, as well as documentation
improvements.

### Fixed

- **fmt**: Fixed `fmt` not emitting log lines when timestamp formatting fails
  ([#1689])
- **fmt**: Fixed double space before thread IDs with `Pretty` formatter
  ([#1778])
- Several documentation improvements ([#1608], [#1699], [#1701])

[#1689]: #1689
[#1778]: #1778
[#1608]: #1608
[#1699]: #1699
[#1701]: #1701

Thanks to new contributors @Swatinem and @rukai for contributing to this
release!
hawkw added a commit that referenced this pull request Dec 23, 2021
# 0.3.4 (Dec 23, 2021)

This release contains bugfixes for the `fmt` module, as well as documentation
improvements.

### Fixed

- **fmt**: Fixed `fmt` not emitting log lines when timestamp formatting fails
  ([#1689])
- **fmt**: Fixed double space before thread IDs with `Pretty` formatter
  ([#1778])
- Several documentation improvements ([#1608], [#1699], [#1701])

[#1689]: #1689
[#1778]: #1778
[#1608]: #1608
[#1699]: #1699
[#1701]: #1701

Thanks to new contributors @Swatinem and @rukai for contributing to this
release!
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
# 0.3.4 (Dec 23, 2021)

This release contains bugfixes for the `fmt` module, as well as documentation
improvements.

### Fixed

- **fmt**: Fixed `fmt` not emitting log lines when timestamp formatting fails
  ([tokio-rs#1689])
- **fmt**: Fixed double space before thread IDs with `Pretty` formatter
  ([tokio-rs#1778])
- Several documentation improvements ([tokio-rs#1608], [tokio-rs#1699], [tokio-rs#1701])

[tokio-rs#1689]: tokio-rs#1689
[tokio-rs#1778]: tokio-rs#1778
[tokio-rs#1608]: tokio-rs#1608
[tokio-rs#1699]: tokio-rs#1699
[tokio-rs#1701]: tokio-rs#1701

Thanks to new contributors @Swatinem and @rukai for contributing to this
release!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants