pretty-env-logger icon indicating copy to clipboard operation
pretty-env-logger copied to clipboard

Indirect dependency on regex

Open davidgraeff opened this issue 6 years ago • 2 comments

Thanks for this crate!

You are currently using env_logger with default features. This includes the regex crate with default features which adds about 1.3MB to a binaries size (see https://github.com/rust-lang/regex/pull/613).

Could you maybe add (and proxy) the features of env_logger so that a consumer of your crate can disable the default features (ie "regex")?

Something along the lines of the following would help:

[features]
default = ["termcolor", "atty", "humantime", "regex"]
termcolor = ["env_logger/termcolor"]
atty = ["env_logger/atty"]
humantime = ["env_logger/humantime"]
regex = ["env_logger/regex"]

davidgraeff avatar Sep 12 '19 08:09 davidgraeff

Sounds like a good idea to me!

seanmonstar avatar Sep 12 '19 14:09 seanmonstar

Related: https://github.com/env-logger-rs/env_logger/pull/181

link2xt avatar Oct 20 '20 18:10 link2xt