fix: remove requirement for RUSTFLAGS to be set

Closes kemitix/git-next#116
This commit is contained in:
Paul Campbell 2024-07-29 08:07:39 +01:00
parent 691a733fc3
commit e56d6a3ebb
5 changed files with 9 additions and 19 deletions

View file

@ -4,8 +4,6 @@ linker = "/usr/bin/clang-16"
rustflags = [ rustflags = [
"-C", "-C",
"link-arg=--ld-path=/usr/bin/mold", "link-arg=--ld-path=/usr/bin/mold",
"--cfg",
"tokio_unstable",
] ]
[profile.dev] [profile.dev]
@ -14,4 +12,3 @@ strip = "debuginfo"
[env] [env]
RUST_LOG = "hyper=warn,git_url_parse=warn,debug" RUST_LOG = "hyper=warn,git_url_parse=warn,debug"
RUSTFLAGS = "--cfg tokio_unstable"

View file

@ -38,7 +38,6 @@ git-next-file-watcher-actor = { path = "crates/file-watcher-actor", version = "0
clap = { version = "4.5", features = ["cargo", "derive"] } clap = { version = "4.5", features = ["cargo", "derive"] }
# logging # logging
console-subscriber = "0.3"
tracing = "0.1" tracing = "0.1"
tracing-subscriber = "0.3" tracing-subscriber = "0.3"

View file

@ -29,7 +29,6 @@ clap = { workspace = true }
kxio = { workspace = true } kxio = { workspace = true }
# logging # logging
console-subscriber = { workspace = true }
tracing = { workspace = true } tracing = { workspace = true }
tracing-subscriber = { workspace = true } tracing-subscriber = { workspace = true }

View file

@ -11,7 +11,7 @@ use actor::ServerActor;
use git_next_core::git::RepositoryFactory; use git_next_core::git::RepositoryFactory;
use kxio::{fs::FileSystem, network::Network}; use kxio::{fs::FileSystem, network::Network};
use tracing::{info, level_filters::LevelFilter}; use tracing::info;
use std::path::PathBuf; use std::path::PathBuf;
@ -68,20 +68,16 @@ pub fn start(
} }
pub fn init_logging() { pub fn init_logging() {
use tracing_subscriber::prelude::*; use tracing::Level;
use tracing_subscriber::EnvFilter; use tracing_subscriber::FmtSubscriber;
let subscriber = tracing_subscriber::fmt::layer() let subscriber = FmtSubscriber::builder()
.with_target(false) .with_target(false)
.with_file(true) .with_file(true)
.with_line_number(true) .with_line_number(true)
.with_filter( .with_max_level(Level::INFO)
EnvFilter::builder() .finish();
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy(), #[allow(clippy::expect_used)]
); tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");
tracing_subscriber::registry()
.with(console_subscriber::ConsoleLayer::builder().spawn())
.with(subscriber)
.init();
} }

View file

@ -13,7 +13,6 @@ github = []
[dependencies] [dependencies]
# logging # logging
console-subscriber = { workspace = true }
tracing = { workspace = true } tracing = { workspace = true }
tracing-subscriber = { workspace = true } tracing-subscriber = { workspace = true }