Skip to content

Commit

Permalink
adjust filters
Browse files Browse the repository at this point in the history
  • Loading branch information
NorbertBodziony committed Jul 31, 2023
1 parent 0967c3e commit 3fabf90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ once_cell = "1.18.0"
shellexpand = "3.1.0"
cors = "0.1.0"
tower-http = { version = "0.4.3", features = ["cors", "trace"] }
tracing-subscriber = { version = "0.3" }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing = "0.1.37"
1 change: 0 additions & 1 deletion server/src/app/app_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use axum::{
},
response::Response,
};
use dashmap::DashMap;
use futures::StreamExt;

use crate::{
Expand Down
6 changes: 5 additions & 1 deletion server/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use axum::{
Router,
};
use tower::ServiceBuilder;
use tracing_subscriber::EnvFilter;

use crate::{
app::app_handler::on_new_app_connection,
Expand All @@ -32,8 +33,11 @@ pub async fn get_router() -> Router {
// Start cleaning outdated sessions
start_cleaning_sessions(state.sessions.clone(), state.client_to_sessions.clone());
let cors = get_cors();
let filter: EnvFilter = "server=debug,tower_http=trace"
.parse()
.expect("filter should parse");

tracing_subscriber::fmt::init();
tracing_subscriber::fmt().with_env_filter(filter).init();

return Router::new()
.route("/client", get(on_new_client_connection))
Expand Down

0 comments on commit 3fabf90

Please sign in to comment.