Skip to content

Commit

Permalink
Tracing output json (#2060)
Browse files Browse the repository at this point in the history
* Tracing output json

Signed-off-by: Daniele Ahmed <[email protected]>
  • Loading branch information
82marbag authored Dec 6, 2022
1 parent 5487e36 commit 3ecefff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3ecefff

Please sign in to comment.