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

log: remove env_logger feature and usage #2771

Merged
merged 7 commits into from Oct 24, 2023
Merged

Conversation

davidbarsky
Copy link
Member

Removing the env_logger feature in order to address GHSA-g98v-hv3f-hcfr.

For additional details on the approach, please refer to #2750. Note that this
PR depends on #2770, so this PR will temporarily have more commits
than intended.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also remove the deprecated log-tracer module. it's probably easier to do that in this PR?

Comment on lines 70 to 71
//! * `trace-logger`: enables an experimental `log` subscriber, deprecated since
//! version 0.1.1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also remove this before shipping an 0.2.0? i'm fine with doing that in this PR, or in a separate one, up to you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in this PR!

@davidbarsky
Copy link
Member Author

let's also remove the deprecated log-tracer module. it's probably easier to do that in this PR?

Oh, you're right. Let me get on that.

Comment on lines -146 to -147
#[cfg(feature = "trace-logger")]
#[cfg_attr(docsrs, doc(cfg(feature = "trace-logger")))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this module had a feature flag, can we also remove the feature flag from the Cargo.toml?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, sorry—I had completely missed that.

@hawkw hawkw enabled auto-merge (squash) October 24, 2023 16:50
when we removed the `trace_logger` module, we didn't remove the attributes on the module declaration, and they accidentally ended up applying to the `log` crate reexport instead. whoops.
@hawkw hawkw merged commit 1c802c7 into v0.1.x Oct 24, 2023
33 of 53 checks passed
@hawkw hawkw deleted the david/remove-env-logger-feature branch October 24, 2023 17:09
hawkw pushed a commit that referenced this pull request Oct 24, 2023
# 0.2.0 (October 24th, 2023)

This release contains two breaking changes: the removal of the `env_logger`
and `trace_logger` features. Below are the suggested migration paths:

- `env_logger`: users should use [`tracing_subscriber::fmt::Subscriber`]
  or [`tracing_subscriber::fmt::Layer`] with the [`Targets`] or
  [`EnvFilter`] filters instead.
- `trace_logger`: users should use the `tracing` crate's
  ["log" feature flag][log-feature] instead. 

### Breaking Changes

- Remove deprecated `env_logger` feature. This removes the dependency
  on the unmaintained `atty` crate, resolving the security advisory
  [GHSA-g98v-hv3f-hcfr]/[RUSTSEC-2021-0145]. ([#2771])  
- Remove deprecated `trace_logger` feature. ([#2771])

[#2771]: #2771
[`tracing_subscriber::fmt::Subscriber`]: https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Subscriber.html
[`tracing_subscriber::fmt::Layer`]: https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Layer.html
[`Targets`]: https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/targets/struct.Targets.html
[`EnvFilter`]: https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/struct.EnvFilter.html
[log-feature]: https://docs.rs/tracing/latest/tracing/#emitting-log-records
[GHSA-g98v-hv3f-hcfr]: GHSA-g98v-hv3f-hcfr
[RUSTSEC-2021-0145]: https://rustsec.org/advisories/RUSTSEC-2021-0145.html
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.

None yet

2 participants