Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Reduce logs level #2446

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions dozer-ingestion/aerospike/src/connector.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dozer_ingestion_connector::dozer_types::errors::internal::BoxedError;
use dozer_ingestion_connector::dozer_types::event::Event;
use dozer_ingestion_connector::dozer_types::log::{error, info, trace, warn};
use dozer_ingestion_connector::dozer_types::log::{debug, error, info, trace, warn};
use dozer_ingestion_connector::dozer_types::models::connection::AerospikeConnection;
use dozer_ingestion_connector::dozer_types::models::ingestion_types::{
IngestionMessage, TransactionInfo,
Expand Down Expand Up @@ -336,15 +336,15 @@ async fn event_request_handler(
let event = json.into_inner();
let state = data.into_inner();

trace!("Event data: {:?}", event);
trace!(target: "aerospike_http_server", "Event data: {:?}", event);
// TODO: Handle delete
if event.msg != "write" {
return HttpResponse::Ok().finish();
}

let message = map_record(event, &state.tables_index_map).await;

trace!("Mapped message {:?}", message);
trace!(target: "aerospike_http_server", "Mapped message {:?}", message);
match message {
Ok(None) => HttpResponse::Ok().finish(),
Ok(Some(message)) => {
Expand Down Expand Up @@ -376,8 +376,9 @@ async fn batch_event_request_handler(
let state = data.into_inner();

let mut messages = vec![];
trace!("Aerospike events {:?}", events);
info!("Events counts: {}", events.len());
debug!(target: "aerospike_http_server", "Aerospike events count {:?}", events.len());
trace!(target: "aerospike_http_server", "Aerospike events {:?}", events);

for event in events {
match map_record(event, &state.tables_index_map).await {
Ok(None) => {}
Expand All @@ -386,8 +387,9 @@ async fn batch_event_request_handler(
}
}

trace!("Mapped messages {:?}", messages);
info!("Mapped messages count {}", messages.len());
debug!(target: "aerospike_http_server", "Mapped {:?} messages", messages.len());
trace!(target: "aerospike_http_server", "Mapped messages {:?}", messages);

let (sender, receiver) = oneshot::channel::<()>();
if let Err(e) = state.sender.send(PendingMessage { messages, sender }) {
error!("Ingestor is down: {:?}", e);
Expand Down
4 changes: 2 additions & 2 deletions dozer-sink-oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ enum OpKind {

impl OracleSink {
fn exec_batch(&mut self) -> oracle::Result<()> {
debug!("Executing batch of size {}", self.batch_params.len());
debug!(target: "oracle_sink", "Executing batch of size {}", self.batch_params.len());
let started = std::time::Instant::now();
let mut batch = self
.conn
Expand All @@ -621,7 +621,7 @@ impl OracleSink {
batch.append_row(&[])?;
}
batch.execute()?;
info!("Execution took {:?}", started.elapsed());
debug!(target: "oracle_sink", "Execution took {:?}", started.elapsed());
Ok(())
}

Expand Down
Loading