-
Notifications
You must be signed in to change notification settings - Fork 756
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
Make tracing_subscriber::fmt::format::Writer::new
public
#2223
Comments
I also wanted this when investigating #2334 , ended up with bunch of copy-paste... |
I am somewhat confused as to why this issue has not been moved forward at all? The change itself is trivial (code wise, I am not sure what the wider reaching effects may be/other plans that might conflict with such a change), but there is already a PR. Are the maintainers backing off? |
This was referenced Aug 10, 2023
hawkw
added a commit
that referenced
this issue
Oct 12, 2023
## Motivation As seen here #2512 and #2223. Previously pr'ed here #2525, but no progress has been made there for quite some. I have applied the suggested changes. Not sure the formatting of the doc is sufficient or otherwise correct ## Solution Make the `format::Writer::new()` function public. I don't see any obvious trade-offs, but I am not familiar with the larger direction of tracing/subscriber, so I may be wrong. Closes #2512 Closes #2223 Co-authored-by: Cephas Storm <cephas.storm@borisfx.com> Co-authored-by: Eliza Weisman <eliza@buoyant.io>
davidbarsky
pushed a commit
that referenced
this issue
Oct 12, 2023
## Motivation As seen here #2512 and #2223. Previously pr'ed here #2525, but no progress has been made there for quite some. I have applied the suggested changes. Not sure the formatting of the doc is sufficient or otherwise correct ## Solution Make the `format::Writer::new()` function public. I don't see any obvious trade-offs, but I am not familiar with the larger direction of tracing/subscriber, so I may be wrong. Closes #2512 Closes #2223 Co-authored-by: Cephas Storm <cephas.storm@borisfx.com> Co-authored-by: Eliza Weisman <eliza@buoyant.io>
kaffarell
pushed a commit
to kaffarell/tracing
that referenced
this issue
Nov 21, 2023
## Motivation As seen here tokio-rs#2512 and tokio-rs#2223. Previously pr'ed here tokio-rs#2525, but no progress has been made there for quite some. I have applied the suggested changes. Not sure the formatting of the doc is sufficient or otherwise correct ## Solution Make the `format::Writer::new()` function public. I don't see any obvious trade-offs, but I am not familiar with the larger direction of tracing/subscriber, so I may be wrong. Closes tokio-rs#2512 Closes tokio-rs#2223 Co-authored-by: Cephas Storm <cephas.storm@borisfx.com> Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Crates
https://github.com/tokio-rs/tracing
https://github.com/davidbarsky/tracing-tree
Motivation
I'm using
tracing-tree
, but it lacks timestamps. I opened an issue intracing-tree
about it and @davidbarsky suggested thatFormatTime
can be used as part of the implementation.When trying to add support for it, I stumbled upon
Writer
which is needed for callingFormatTime::format_time
. However,Writer
has only one private constructor and cannot be instantiated outside thetracing-subscriber
crate, which is quite limiting.Proposal
Simple solution would be to make constructor entirely public, as suggested in TODO by @hawkw.
Alternatives
Another solution is to (maybe) add custom constructor that accepts
String
, for instance. This eliminates the need for making existing constructor public, butWriter::new(&'writer mut impl fmt::Write)
seems to be more flexible.The text was updated successfully, but these errors were encountered: