Skip to content

Commit

Permalink
feature: initialize logger on clone qdrant script
Browse files Browse the repository at this point in the history
  • Loading branch information
cdxker committed Nov 3, 2024
1 parent 30c4c7e commit a13f1de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/src/bin/clone-qdrant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use qdrant_client::{
qdrant::{PointStruct, UpsertPointsBuilder},
Qdrant,
};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer};
use trieve_server::{
errors::ServiceError, operators::qdrant_operator::scroll_qdrant_collection_ids_custom_url,
};
Expand All @@ -10,6 +11,15 @@ use trieve_server::{
async fn main() -> Result<(), ServiceError> {
dotenvy::dotenv().ok();

tracing_subscriber::Registry::default()
.with(
tracing_subscriber::fmt::layer().with_filter(
EnvFilter::from_default_env()
.add_directive(tracing_subscriber::filter::LevelFilter::INFO.into()),
),
)
.init();

let origin_qdrant_url =
std::env::var("ORIGIN_QDRANT_URL").expect("ORIGIN_QDRANT_URL is not set");
let new_qdrant_url = std::env::var("NEW_QDRANT_URL").expect("NEW_QDRANT_URL is not set");
Expand Down

0 comments on commit a13f1de

Please sign in to comment.