mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-27 14:16:18 +00:00
refactor: remove re-export from logging (#3865)
* refactor: remove re-export from logging Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix merge problem Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * run formatter Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@ use catalog::{OpenSystemTableHook, RegisterSystemTableRequest};
|
||||
use common_catalog::consts::{default_engine, DEFAULT_SCHEMA_NAME};
|
||||
use common_error::ext::ErrorExt;
|
||||
use common_query::Output;
|
||||
use common_telemetry::logging;
|
||||
use common_telemetry::info;
|
||||
use futures::future::FutureExt;
|
||||
use query::QueryEngineRef;
|
||||
use servers::query_handler::grpc::GrpcQueryHandlerRef;
|
||||
@@ -106,11 +106,11 @@ impl<E: ErrorExt + Send + Sync + 'static> ScriptManager<E> {
|
||||
let mut compiled = self.compiled.write().unwrap();
|
||||
let _ = compiled.insert(name.to_string(), script.clone());
|
||||
}
|
||||
logging::info!("Compiled and cached script: {}", name);
|
||||
info!("Compiled and cached script: {}", name);
|
||||
|
||||
script.as_ref().register_udf().await;
|
||||
|
||||
logging::info!("Script register as UDF: {}", name);
|
||||
info!("Script register as UDF: {}", name);
|
||||
|
||||
Ok(script)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ use catalog::error::CompileScriptInternalSnafu;
|
||||
use common_error::ext::{BoxedError, ErrorExt};
|
||||
use common_query::OutputData;
|
||||
use common_recordbatch::{util as record_util, RecordBatch, SendableRecordBatchStream};
|
||||
use common_telemetry::logging;
|
||||
use common_telemetry::{debug, info, warn};
|
||||
use common_time::util;
|
||||
use datafusion::datasource::DefaultTableSource;
|
||||
use datafusion::logical_expr::{and, col, lit};
|
||||
@@ -127,7 +127,7 @@ impl<E: ErrorExt + Send + Sync + 'static> ScriptsTable<E> {
|
||||
script_list.extend(part_of_scripts_list);
|
||||
}
|
||||
|
||||
logging::info!(
|
||||
info!(
|
||||
"Found {} scripts in {}",
|
||||
script_list.len(),
|
||||
table_info.full_table_name()
|
||||
@@ -137,16 +137,15 @@ impl<E: ErrorExt + Send + Sync + 'static> ScriptsTable<E> {
|
||||
match PyScript::from_script(&script, query_engine.clone()) {
|
||||
Ok(script) => {
|
||||
script.register_udf().await;
|
||||
logging::debug!(
|
||||
debug!(
|
||||
"Script in `scripts` system table re-register as UDF: {}",
|
||||
name
|
||||
);
|
||||
}
|
||||
Err(err) => {
|
||||
logging::warn!(
|
||||
warn!(
|
||||
r#"Failed to compile script "{}"" in `scripts` table: {}"#,
|
||||
name,
|
||||
err
|
||||
name, err
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -189,7 +188,7 @@ impl<E: ErrorExt + Send + Sync + 'static> ScriptsTable<E> {
|
||||
.map_err(BoxedError::new)
|
||||
.context(InsertScriptSnafu { name })?;
|
||||
|
||||
logging::info!(
|
||||
info!(
|
||||
"Inserted script: {} into scripts table: {}, output: {:?}.",
|
||||
name,
|
||||
table_info.full_table_name(),
|
||||
|
||||
Reference in New Issue
Block a user