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

Document generic S parameter in Layer trait #452

Closed
jonhoo opened this issue Nov 26, 2019 · 0 comments · Fixed by #566
Closed

Document generic S parameter in Layer trait #452

jonhoo opened this issue Nov 26, 2019 · 0 comments · Fixed by #566
Labels
crate/subscriber Related to the `tracing-subscriber` crate kind/docs

Comments

@jonhoo
Copy link
Contributor

jonhoo commented Nov 26, 2019

Bug Report

The Layer trait in tracing-subscriber has a type parameter called S, but the docs do not say what that parameter is meant to represent. I think it's the "inner" subscriber, but the docs should make that clear.

@hawkw hawkw added crate/subscriber Related to the `tracing-subscriber` crate kind/docs labels Nov 26, 2019
@hawkw hawkw closed this as completed in #566 Feb 4, 2020
hawkw added a commit that referenced this issue Feb 4, 2020
Depends on #564 

This commit adds a new section to the `Layer` docs on how `Layer`s and
`Subscriber`s are composed. Additionally, it updates the docs to prefer
the use of `SubscriberExt::with` over `Layer::with_subscriber`.

Additionally, I've fixed how `SubscriberExt::with` is implemented, so
that `Layer`s may use `with_subscriber` as a callback for composition.

Closes  #452
Closes #505 (IMO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/subscriber Related to the `tracing-subscriber` crate kind/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants