diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/Cargo.toml b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/Cargo.toml index 51f9c6f1a2d70ee5b8371a251115746fd10cb455..06738fcc54d0be58fdec6a33cc726ff36d0433fb 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/Cargo.toml +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/Cargo.toml @@ -32,7 +32,7 @@ tokio = "1.20.1" tower = "0.4" tower-http = { version = "0.3", features = ["trace"] } tracing = "0.1" -tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.15", features = ["env-filter", "json"] } # These dependencies are only required for the `pokemon-service-tls` program. tls-listener = { version = "0.5.1", features = ["rustls", "hyper-h2"] } diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/lib.rs b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/lib.rs index acaeb55c0cb25bed5eba24cc33d778efd12fbbf0..a052837b29e94f619493072f3e5af4414e26b57b 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/lib.rs +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/lib.rs @@ -32,7 +32,7 @@ const PIKACHU_JAPANESE_FLAVOR_TEXT: &str = /// Setup `tracing::subscriber` to read the log level from RUST_LOG environment variable. pub fn setup_tracing() { - let format = tracing_subscriber::fmt::layer().pretty(); + let format = tracing_subscriber::fmt::layer().json(); let filter = EnvFilter::try_from_default_env() .or_else(|_| EnvFilter::try_new("info")) .unwrap();