Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editoast: add default log directive to display all HTTP calls #8830

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion editoast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ uuid = { version = "1.10.0", features = ["serde", "v4"] }
# For batch dependency updates, see editoast/README.md

async-trait = "0.1.82"
axum = { version = "0.7.5", default-features = false, features = ["multipart"] }
axum = { version = "0.7.5", default-features = false, features = [
"multipart",
"tracing",
] }
axum-extra = { version = "0.9.3", default-features = false, features = [
"typed-header",
] }
Expand Down Expand Up @@ -181,6 +184,7 @@ async-std = { version = "1.12.0", features = ["attributes", "tokio1"] }
axum = { version = "0.7.5", default-features = false, features = [
"macros",
"multipart",
"tracing",
] }
editoast_authz = { workspace = true, features = ["fixtures"] }
editoast_models = { workspace = true, features = ["testing"] }
Expand Down
7 changes: 6 additions & 1 deletion editoast/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ fn init_tracing(mode: EditoastMode, telemetry_config: &client::TelemetryConfig)
let env_filter_layer = tracing_subscriber::EnvFilter::builder()
// Set the default log level to 'info'
.with_default_directive(tracing_subscriber::filter::LevelFilter::INFO.into())
.from_env_lossy();
.from_env_lossy()
.add_directive(
"tower_http=debug"
.parse()
.expect("valid 'RUST_LOG' directive"),
);
let fmt_layer = tracing_subscriber::fmt::layer()
.pretty()
.with_file(true)
Expand Down
Loading