Allow to control tracing from the environment
This commit is contained in:
parent
e4765a20ef
commit
da7d012393
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ use migration::{Migrator, MigratorTrait};
|
||||||
use sea_orm::{ConnectOptions, Database, DatabaseConnection};
|
use sea_orm::{ConnectOptions, Database, DatabaseConnection};
|
||||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||||
use tower_http::services::ServeDir;
|
use tower_http::services::ServeDir;
|
||||||
|
use tracing_subscriber::EnvFilter;
|
||||||
|
|
||||||
pub(crate) mod entity;
|
pub(crate) mod entity;
|
||||||
mod routes;
|
mod routes;
|
||||||
|
|
@ -101,6 +102,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_max_level(tracing::Level::DEBUG)
|
.with_max_level(tracing::Level::DEBUG)
|
||||||
.with_test_writer()
|
.with_test_writer()
|
||||||
|
.with_env_filter(EnvFilter::from_default_env())
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
let config = Settings::new()?;
|
let config = Settings::new()?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue