- update: logging system to only show logs from the app and not any 3rd party dependencies
This commit is contained in:
@@ -9,7 +9,7 @@ dotenv = "0.15"
|
||||
tokio = { version = "1.41.1", features = ["full"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.3.18"
|
||||
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "chrono"] }
|
||||
tonic = "0.12.3"
|
||||
prost = "0.13.4"
|
||||
warp = "0.3.7"
|
||||
|
||||
@@ -12,17 +12,15 @@ use std::env;
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
use tracing::Level;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use utils::logging;
|
||||
use utils::service_discovery::{get_kube_service_endpoints_by_dns};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
dotenv().ok();
|
||||
tracing_subscriber::fmt()
|
||||
.with_max_level(
|
||||
Level::from_str(&env::var("LOG_LEVEL").unwrap_or_else(|_| "info".to_string()))
|
||||
.unwrap_or_else(|_| Level::INFO),
|
||||
)
|
||||
.init();
|
||||
let app_name = env!("CARGO_PKG_NAME");
|
||||
logging::setup_logging(app_name);
|
||||
|
||||
// Set the gRPC server address
|
||||
let addr = env::var("LISTEN_ADDR").unwrap_or_else(|_| "0.0.0.0".to_string());
|
||||
|
||||
Reference in New Issue
Block a user