Skip to content

Commit

Permalink
Better log levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Jan 16, 2024
1 parent 9981ad4 commit 719535d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion quickwit/quickwit-cli/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn setup_logging_and_tracing(
}
let env_filter = env::var("RUST_LOG")
.map(|_| EnvFilter::from_default_env())
.or_else(|_| EnvFilter::try_new(format!("quickwit={level}")))
.or_else(|_| EnvFilter::try_new(format!("quickwit={level},tantivy=WARN")))
.context("Failed to set up tracing env filter.")?;
global::set_text_map_propagator(TraceContextPropagator::new());
let registry = tracing_subscriber::registry().with(env_filter);
Expand Down
6 changes: 3 additions & 3 deletions quickwit/quickwit-indexing/src/actors/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use tantivy::tokenizer::TokenizerManager;
use tantivy::{DateTime, IndexBuilder, IndexSettings};
use tokio::runtime::Handle;
use tokio::sync::{OwnedSemaphorePermit, Semaphore};
use tracing::{info, info_span, warn, Span};
use tracing::{info, info_span, warn, Span, debug_span};
use ulid::Ulid;

use crate::actors::IndexSerializer;
Expand Down Expand Up @@ -183,13 +183,13 @@ impl IndexerState {
ctx: &ActorContext<Indexer>,
) -> anyhow::Result<IndexingWorkbench> {
let workbench_id = Ulid::new();
let batch_parent_span = info_span!(target: "quickwit-indexing", "index-doc-batches",
let batch_parent_span = debug_span!(target: "quickwit-indexing", "index-doc-batches",
index_id=%self.pipeline_id.index_uid.index_id(),
source_id=%self.pipeline_id.source_id,
pipeline_uid=%self.pipeline_id.pipeline_uid,
workbench_id=%workbench_id,
);
let indexing_span = info_span!(parent: batch_parent_span.id(), "indexer");
let indexing_span = debug_span!(parent: batch_parent_span.id(), "indexer");
let indexing_permit =
if let Some(cooperative_indexing_permits) = &self.cooperative_indexing_permits {
let indexing_permit: OwnedSemaphorePermit = ctx
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-indexing/src/source/ingest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl IngestSource {
return Ok(());
}

warn!("resetting pipeline");
warn!(index_uid=self.client_id.source_uid.index_uid, pipeline_uid=self.client_id.pipeline_uid, "resetting pipeline");
self.assigned_shards.clear();
self.fetch_stream.reset();
self.publish_lock.kill().await;
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-ingest/src/ingest_v2/ingester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl Ingester {
shard: Shard,
) -> IngestV2Result<()> {
let queue_id = shard.queue_id();

info!(index_uid=shard.index_uid, source=shard.source_id, shard=shard.shard_id, "init primary shard");
let Entry::Vacant(entry) = state.shards.entry(queue_id.clone()) else {
return Ok(());
};
Expand Down

0 comments on commit 719535d

Please sign in to comment.