reduce the log level of some info!

This commit is contained in:
Tamo 2021-06-23 10:41:55 +02:00
parent a2368db154
commit b4fd4212ad
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69
6 changed files with 17 additions and 17 deletions

View File

@ -4,7 +4,7 @@ use std::marker::PhantomData;
use std::num::NonZeroUsize; use std::num::NonZeroUsize;
use flate2::read::GzDecoder; use flate2::read::GzDecoder;
use log::info; use log::{debug, info, trace};
use milli::update::{IndexDocumentsMethod, UpdateBuilder, UpdateFormat}; use milli::update::{IndexDocumentsMethod, UpdateBuilder, UpdateFormat};
use serde::{Deserialize, Serialize, Serializer}; use serde::{Deserialize, Serialize, Serializer};
@ -201,7 +201,7 @@ impl Index {
update_builder: UpdateBuilder, update_builder: UpdateBuilder,
primary_key: Option<&str>, primary_key: Option<&str>,
) -> Result<UpdateResult> { ) -> Result<UpdateResult> {
info!("performing document addition"); trace!("performing document addition");
// Set the primary key if not set already, ignore if already set. // Set the primary key if not set already, ignore if already set.
if let (None, Some(primary_key)) = (self.primary_key(txn)?, primary_key) { if let (None, Some(primary_key)) = (self.primary_key(txn)?, primary_key) {
@ -215,7 +215,7 @@ impl Index {
builder.index_documents_method(method); builder.index_documents_method(method);
let indexing_callback = let indexing_callback =
|indexing_step, update_id| info!("update {}: {:?}", update_id, indexing_step); |indexing_step, update_id| debug!("update {}: {:?}", update_id, indexing_step);
let gzipped = false; let gzipped = false;
let addition = match content { let addition = match content {
@ -300,7 +300,7 @@ impl Index {
} }
builder.execute(|indexing_step, update_id| { builder.execute(|indexing_step, update_id| {
info!("update {}: {:?}", update_id, indexing_step) debug!("update {}: {:?}", update_id, indexing_step)
})?; })?;
Ok(UpdateResult::Other) Ok(UpdateResult::Other)

View File

@ -5,7 +5,7 @@ use std::sync::Arc;
use async_stream::stream; use async_stream::stream;
use chrono::Utc; use chrono::Utc;
use futures::{lock::Mutex, stream::StreamExt}; use futures::{lock::Mutex, stream::StreamExt};
use log::{error, info}; use log::{error, trace};
use tokio::sync::{mpsc, oneshot, RwLock}; use tokio::sync::{mpsc, oneshot, RwLock};
use update_actor::UpdateActorHandle; use update_actor::UpdateActorHandle;
use uuid_resolver::UuidResolverHandle; use uuid_resolver::UuidResolverHandle;
@ -60,7 +60,7 @@ where
} }
pub async fn run(mut self) { pub async fn run(mut self) {
info!("Started dump actor."); trace!("Started dump actor.");
let mut inbox = self let mut inbox = self
.inbox .inbox
@ -135,7 +135,7 @@ where
match task_result { match task_result {
Ok(Ok(())) => { Ok(Ok(())) => {
dump_infos.done(); dump_infos.done();
info!("Dump succeed"); trace!("Dump succeed");
} }
Ok(Err(e)) => { Ok(Err(e)) => {
dump_infos.with_error(e.to_string()); dump_infos.with_error(e.to_string());

View File

@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
use anyhow::Context; use anyhow::Context;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use log::{info, warn}; use log::{info, trace, warn};
#[cfg(test)] #[cfg(test)]
use mockall::automock; use mockall::automock;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@ -164,7 +164,7 @@ where
P: UpdateActorHandle + Send + Sync + Clone + 'static, P: UpdateActorHandle + Send + Sync + Clone + 'static,
{ {
async fn run(self) -> Result<()> { async fn run(self) -> Result<()> {
info!("Performing dump."); trace!("Performing dump.");
create_dir_all(&self.path).await?; create_dir_all(&self.path).await?;

View File

@ -2,7 +2,7 @@ use std::path::{Path, PathBuf};
use std::time::Duration; use std::time::Duration;
use anyhow::bail; use anyhow::bail;
use log::{error, info}; use log::{error, info, trace};
use tokio::fs; use tokio::fs;
use tokio::task::spawn_blocking; use tokio::task::spawn_blocking;
use tokio::time::sleep; use tokio::time::sleep;
@ -47,14 +47,14 @@ where
); );
loop { loop {
if let Err(e) = self.perform_snapshot().await { if let Err(e) = self.perform_snapshot().await {
error!("{}", e); error!("Error while performing snapshot: {}", e);
} }
sleep(self.snapshot_period).await; sleep(self.snapshot_period).await;
} }
} }
async fn perform_snapshot(&self) -> anyhow::Result<()> { async fn perform_snapshot(&self) -> anyhow::Result<()> {
info!("Performing snapshot."); trace!("Performing snapshot.");
let snapshot_dir = self.snapshot_path.clone(); let snapshot_dir = self.snapshot_path.clone();
fs::create_dir_all(&snapshot_dir).await?; fs::create_dir_all(&snapshot_dir).await?;
@ -87,7 +87,7 @@ where
}) })
.await??; .await??;
info!("Created snapshot in {:?}.", snapshot_path); trace!("Created snapshot in {:?}.", snapshot_path);
Ok(()) Ok(())
} }

View File

@ -6,7 +6,7 @@ use std::sync::Arc;
use async_stream::stream; use async_stream::stream;
use futures::StreamExt; use futures::StreamExt;
use log::info; use log::{trace};
use oxidized_json_checker::JsonChecker; use oxidized_json_checker::JsonChecker;
use tokio::fs; use tokio::fs;
use tokio::io::AsyncWriteExt; use tokio::io::AsyncWriteExt;
@ -61,7 +61,7 @@ where
pub async fn run(mut self) { pub async fn run(mut self) {
use UpdateMsg::*; use UpdateMsg::*;
info!("Started update actor."); trace!("Started update actor.");
let mut inbox = self let mut inbox = self
.inbox .inbox

View File

@ -1,6 +1,6 @@
use std::{collections::HashSet, path::PathBuf}; use std::{collections::HashSet, path::PathBuf};
use log::{info, warn}; use log::{trace, warn};
use tokio::sync::mpsc; use tokio::sync::mpsc;
use uuid::Uuid; use uuid::Uuid;
@ -19,7 +19,7 @@ impl<S: UuidStore> UuidResolverActor<S> {
pub async fn run(mut self) { pub async fn run(mut self) {
use UuidResolveMsg::*; use UuidResolveMsg::*;
info!("uuid resolver started"); trace!("uuid resolver started");
loop { loop {
match self.inbox.recv().await { match self.inbox.recv().await {