remove unnecessary config overwrite

Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
tezlm 2023-10-28 22:14:21 -04:00 committed by girlbossceo
parent 95187419f9
commit 23ec725923

View file

@ -80,8 +80,6 @@ async fn main() {
} }
}; };
let log = format!("{},ruma_state_res=error,_=off,sled=off", config.log);
if config.allow_jaeger { if config.allow_jaeger {
opentelemetry::global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new()); opentelemetry::global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new());
let tracer = opentelemetry_jaeger::new_agent_pipeline() let tracer = opentelemetry_jaeger::new_agent_pipeline()
@ -91,7 +89,7 @@ async fn main() {
.unwrap(); .unwrap();
let telemetry = tracing_opentelemetry::layer().with_tracer(tracer); let telemetry = tracing_opentelemetry::layer().with_tracer(tracer);
let filter_layer = match EnvFilter::try_new(&log) { let filter_layer = match EnvFilter::try_new(&config.log) {
Ok(s) => s, Ok(s) => s,
Err(e) => { Err(e) => {
eprintln!( eprintln!(
@ -118,7 +116,7 @@ async fn main() {
} else { } else {
let registry = tracing_subscriber::Registry::default(); let registry = tracing_subscriber::Registry::default();
let fmt_layer = tracing_subscriber::fmt::Layer::new(); let fmt_layer = tracing_subscriber::fmt::Layer::new();
let filter_layer = match EnvFilter::try_new(&log) { let filter_layer = match EnvFilter::try_new(&config.log) {
Ok(s) => s, Ok(s) => s,
Err(e) => { Err(e) => {
eprintln!("It looks like your config is invalid. The following error occured while parsing it: {e}"); eprintln!("It looks like your config is invalid. The following error occured while parsing it: {e}");