Skip to content

Commit 4219851

Browse files
rossmacarthuryoshuawuyts
authored andcommitted
Make femme dependency optional
It now is only installed via the `logger` feature. In order to do this we need the `std` feature from `log` crate.
1 parent aaef318 commit 4219851

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ rustdoc-args = ["--cfg", "feature=\"docs\""]
2626
[features]
2727
default = ["h1-server", "logger", "sessions"]
2828
h1-server = ["async-h1"]
29-
logger = []
29+
logger = ["femme"]
3030
docs = ["unstable"]
3131
sessions = ["async-session"]
3232
unstable = []
@@ -39,9 +39,10 @@ async-session = { version = "2.0.0", optional = true }
3939
async-sse = "4.0.0"
4040
async-std = { version = "1.6.0", features = ["unstable"] }
4141
async-trait = "0.1.36"
42-
femme = "2.0.1"
42+
femme = { version = "2.0.1", optional = true }
4343
futures-util = "0.3.5"
4444
http-types = "2.4.0"
45+
log = { version = "0.4.8", features = ["std"] }
4546
kv-log-macro = "1.0.4"
4647
pin-project-lite = "0.1.7"
4748
route-recognizer = "0.2.0"

src/log/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ pub use kv_log_macro::{max_level, Level};
2121

2222
mod middleware;
2323

24+
#[cfg(feature = "logger")]
2425
pub use femme::LevelFilter;
26+
2527
pub use middleware::LogMiddleware;
2628

2729
/// Start logging.

0 commit comments

Comments
 (0)