Skip to content

Commit cbc9a17

Browse files
committed
support just simple RUST_LOG statements
Retains support for `RUST_LOG=$level` as that's built in.
1 parent 36ecc02 commit cbc9a17

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

Cargo.lock

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ hyper-util = { version = "0.1", default-features = false, features = ["tokio", "
1515
tokio = { version = "1.43", features = ["rt-multi-thread", "macros", "signal"] }
1616
tokio-util = { version = "0.7.8", default-features = false, features = ["time"] }
1717
tracing = "0.1"
18-
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
18+
tracing-subscriber = "0.3"
1919
twilight-http-ratelimiting = { version = "0.16.0" }
2020

2121
# Only used by the `expose-metrics` feature.

src/main.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ use std::{
3232
};
3333
use tokio::{net::TcpListener, task::JoinSet};
3434
use tracing::{debug, error, info, trace, warn};
35-
use tracing_subscriber::EnvFilter;
3635
use twilight_http_ratelimiting::{
3736
InMemoryRatelimiter, Method, Path, RatelimitHeaders, Ratelimiter,
3837
};
@@ -64,11 +63,7 @@ static METRIC_KEY: LazyLock<Cow<str>> = LazyLock::new(|| {
6463

6564
#[tokio::main]
6665
async fn main() -> Result<(), Box<dyn Error>> {
67-
tracing_subscriber::fmt()
68-
.with_env_filter(
69-
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")),
70-
)
71-
.init();
66+
tracing_subscriber::fmt::init();
7267

7368
let host_raw = env::var("HOST").unwrap_or_else(|_| "0.0.0.0".into());
7469
let host = IpAddr::from_str(&host_raw)?;

0 commit comments

Comments
 (0)