-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 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
- Loading branch information
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters