-
Notifications
You must be signed in to change notification settings - Fork 880
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
tracing_subscriber
should log to stderr
#4992
Comments
I'd like to pick this up |
I think that would make sense. We only use this in examples and tests, neither of which get released to crates.io, so we can make a crate in |
@eserilev still working on this? If not I wouldn't mind taking a look |
@JacobOgle feel free to pick this up if you'd like |
Can I pick this up? |
@nazreen go for it! I've been too tied up with school to take a dive into it |
@JacobOgle cool! this will be my first time contributing to this repo. the label |
Yes! |
@nazreen Are you currently working on this? I would like to pick this up if you don't mind. |
Hey, I got caught up with other things, so go on ahead :)
…On Mon, 11 Mar 2024 at 20:37, DrHuangMHT ***@***.***> wrote:
@nazreen <https://github.com/nazreen> Are you currently working on this?
I would like to pick this up if you don't mind.
—
Reply to this email directly, view it on GitHub
<#4992 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACTU44R72YG6GYPCZ6THE4DYXWQPJAVCNFSM6AAAAABAOYS7JWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGM2DGNRQGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I suppose we can use a macro to generate the code? And we temporarily override the default manually until |
I don't think there is a need for macros if we can just have a function that is reused across different places. |
My plan is to put the function in |
We definitely don't want it in the libp2p crate because:
Like I said above, best to make a new crate that is marked as |
Ok. What would you like to call it? |
Yeah, |
I find another problem: dependency version. There has been multiple instances of |
We can unify the version of tracing used across the entire workspace using workspace dependencies. Re-exports don't work that well because we'd have to make |
Yeah sure, workspace, I forgot that...
Not sure why it has to be published though. |
If you want to use |
Summary
Diagnostics (e.g. logging) should go to stderr. Output of a program should go to stdout.
Expected behavior
tracing_subscriber
to log to stderr.Actual behavior
tracing_subscriber
is logging to stdout.Upstream bug report tokio-rs/tracing#2492
Relevant log output
No response
Possible Solution
One can easily override the default:
Initialization of
tracing_subscriber
is already quite noisy. E.g. it requires 4 lines instead of the 1 line ofenv_logger
. Should we introduce some abstraction?Version
tracing_subscriber
introduced with #4282.Would you like to work on fixing this bug ?
No
The text was updated successfully, but these errors were encountered: