Skip to content

Commit 4f8f388

Browse files
committed
remove the default env debug logs
1 parent 56ac3cf commit 4f8f388

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ tokio-rustls = "0.26.1"
3030
sled = "0.34.7"
3131
actix-web = "4.9.0"
3232
# datafusion-postgres = { git = "https://github.com/apitoolkit/FusionGate.git" }
33-
datafusion-postgres = { git = "https://github.com/apitoolkit/datafusion-postgres.git", branch = "insert-query-compliance" }
34-
# datafusion-postgres = { path = "../datafusion-projects/datafusion-postgres/datafusion-postgres/" }
33+
# datafusion-postgres = { git = "https://github.com/apitoolkit/datafusion-postgres.git", branch = "insert-query-compliance" }
34+
datafusion-postgres = { path = "../datafusion-projects/datafusion-postgres/datafusion-postgres/" }
3535
datafusion-functions-json = "0.46.0"
3636
anyhow = "1.0.95"
3737
tokio-util = "0.7.13"

src/main.rs

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// main.rs
22
mod database;
33
mod persistent_queue;
4-
use actix_web::{App, HttpResponse, HttpServer, Responder, middleware::Logger, post, web};
4+
use actix_web::{middleware::Logger, post, web, App, HttpResponse, HttpServer, Responder};
55
use database::Database;
66
use dotenv::dotenv;
77
use futures::TryFutureExt;
88
use serde::Deserialize;
99
use std::{env, sync::Arc};
10-
use tokio::time::{Duration, sleep};
10+
use tokio::time::{sleep, Duration};
1111
use tokio_util::sync::CancellationToken;
1212
use tracing::{error, info};
1313
use tracing_subscriber::EnvFilter;
@@ -49,9 +49,7 @@ async fn register_project(req: web::Json<RegisterProjectRequest>, db: web::Data<
4949
async fn main() -> anyhow::Result<()> {
5050
// Initialize environment and logging
5151
dotenv().ok();
52-
tracing_subscriber::fmt()
53-
.with_env_filter(EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("timefusion=debug,pgwire=trace,datafusion=debug")))
54-
.init();
52+
tracing_subscriber::fmt().with_env_filter(EnvFilter::from_default_env()).init();
5553

5654
info!("Starting TimeFusion application");
5755

@@ -75,15 +73,18 @@ async fn main() -> anyhow::Result<()> {
7573
// Start PGWire server
7674
let pgwire_port_var = env::var("PGWIRE_PORT");
7775
info!("PGWIRE_PORT environment variable: {:?}", pgwire_port_var);
78-
79-
let pg_port = pgwire_port_var.unwrap_or_else(|_| {
80-
info!("PGWIRE_PORT not set, using default port 5432");
81-
"5432".to_string()
82-
}).parse::<u16>().unwrap_or_else(|e| {
83-
error!("Failed to parse PGWIRE_PORT value: {:?}, using default 5432", e);
84-
5432
85-
});
86-
76+
77+
let pg_port = pgwire_port_var
78+
.unwrap_or_else(|_| {
79+
info!("PGWIRE_PORT not set, using default port 5432");
80+
"5432".to_string()
81+
})
82+
.parse::<u16>()
83+
.unwrap_or_else(|e| {
84+
error!("Failed to parse PGWIRE_PORT value: {:?}, using default 5432", e);
85+
5432
86+
});
87+
8788
info!("Starting PGWire server on port: {}", pg_port);
8889
let pg_server = db.start_pgwire_server(session_context, pg_port, shutdown_token.clone()).await?;
8990

0 commit comments

Comments
 (0)