[update] added JSON logging support with tracing-subscriber
for production, updated dependencies in Cargo.toml
and Cargo.lock
This commit is contained in:
@@ -11,12 +11,15 @@ use axum::routing::get;
|
||||
use tokio::signal;
|
||||
use tracing::{info};
|
||||
use tracing_subscriber;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
tracing_subscriber::fmt()
|
||||
.with_target(false)
|
||||
.compact()
|
||||
.with_env_filter(EnvFilter::from_default_env())
|
||||
.json() // For production
|
||||
.init();
|
||||
|
||||
let app_settings = AppSettings::get_app_settings();
|
||||
|
Reference in New Issue
Block a user