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

Add feature flag for log support. #307

Closed
wants to merge 1 commit into from

Conversation

samscott89
Copy link

Just a quick potential fix to #306 (if desired).

@LucioFranco
Copy link
Member

@samscott89 would this still provide tracing support?

@samscott89
Copy link
Author

I believe so. AFAICT, the idea seems to be move everything to tracing, and then use the tracing/log feature to provide compatibility with log. (I'm going off of ~ this convo #298 (comment)). Which is on by default since people using log would other see their logs disappear.

The problem is for people using tracing first, and redirecting log outputs to tracing, we now get double the logs. And also a ton of noise since tracing/log logs a bunch of extra stuff, like when spans are entered. Although that is a separate thing.

@hawkw
Copy link
Member

hawkw commented Jul 22, 2019

The problem is for people using tracing first, and redirecting log outputs to tracing, we now get double the logs. And also a ton of noise since tracing/log logs a bunch of extra stuff, like when spans are entered. Although that is a separate thing.

@samscott89 I think there's potentially some strategies we could use to work around the problem of duplicate logs when both tracing-log's LogTracer and the log feature flag are in use, though they might need some design --- there's a tracing ticket in there for sure.

@samscott89
Copy link
Author

The problem is for people using tracing first, and redirecting log outputs to tracing, we now get double the logs. And also a ton of noise since tracing/log logs a bunch of extra stuff, like when spans are entered. Although that is a separate thing.

@samscott89 I think there's potentially some strategies we could use to work around the problem of duplicate logs when both tracing-log's LogTracer and the log feature flag are in use, though they might need some design --- there's a tracing ticket in there for sure.

Hmm, yeah the idea that everyone would expose a log feature does seem a bit unwieldy.

I submitted tokio-rs/tracing#204 as a starting point

@samscott89
Copy link
Author

Okay, I'll close this PR then in favour of solving it in tracing.

@samscott89 samscott89 closed this Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants