mirror of
https://github.com/fluencelabs/aquavm
synced 2024-12-04 15:20:16 +00:00
use log::{trace, debug} instead of log::info for logging (#31)
This commit is contained in:
parent
605c5dda18
commit
c2d81749fe
58
Cargo.lock
generated
58
Cargo.lock
generated
@ -67,7 +67,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "aquamarine-vm"
|
||||
version = "0.1.2"
|
||||
source = "git+https://github.com/fluencelabs/fce?branch=master#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
source = "git+https://github.com/fluencelabs/fce#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
dependencies = [
|
||||
"fluence-faas",
|
||||
"maplit",
|
||||
@ -250,9 +250,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.62"
|
||||
version = "1.0.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40"
|
||||
checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
@ -639,7 +639,7 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
|
||||
[[package]]
|
||||
name = "fce"
|
||||
version = "0.1.11"
|
||||
source = "git+https://github.com/fluencelabs/fce?branch=master#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
source = "git+https://github.com/fluencelabs/fce#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
dependencies = [
|
||||
"boolinator",
|
||||
"fce-utils",
|
||||
@ -661,12 +661,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "fce-utils"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/fluencelabs/fce?branch=master#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
source = "git+https://github.com/fluencelabs/fce#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
|
||||
[[package]]
|
||||
name = "fce-wit-interfaces"
|
||||
version = "0.1.8"
|
||||
source = "git+https://github.com/fluencelabs/fce?branch=master#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
source = "git+https://github.com/fluencelabs/fce#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
dependencies = [
|
||||
"multimap",
|
||||
"wasmer-interface-types-fl",
|
||||
@ -675,7 +675,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "fce-wit-parser"
|
||||
version = "0.1.10"
|
||||
source = "git+https://github.com/fluencelabs/fce?branch=master#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
source = "git+https://github.com/fluencelabs/fce#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"fce-wit-interfaces",
|
||||
@ -702,7 +702,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "fluence-faas"
|
||||
version = "0.1.12"
|
||||
source = "git+https://github.com/fluencelabs/fce?branch=master#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
source = "git+https://github.com/fluencelabs/fce#afa612a5639f900f5730f005f61651edb0c97569"
|
||||
dependencies = [
|
||||
"cmd_lib",
|
||||
"fce",
|
||||
@ -721,6 +721,14 @@ dependencies = [
|
||||
"wasmer-wasi-fl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-macro"
|
||||
version = "0.2.9"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk#fd9672636e8d7a91275e5e0b8b88a34494336e5a"
|
||||
dependencies = [
|
||||
"fluence-sdk-wit 0.2.9 (git+https://github.com/fluencelabs/rust-sdk)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-macro"
|
||||
version = "0.2.9"
|
||||
@ -731,11 +739,13 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-macro"
|
||||
name = "fluence-sdk-main"
|
||||
version = "0.2.9"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk#fd9672636e8d7a91275e5e0b8b88a34494336e5a"
|
||||
dependencies = [
|
||||
"fluence-sdk-wit 0.2.9 (git+https://github.com/fluencelabs/rust-sdk)",
|
||||
"fluence-sdk-macro 0.2.9 (git+https://github.com/fluencelabs/rust-sdk)",
|
||||
"log",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -749,21 +759,10 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-main"
|
||||
version = "0.2.9"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk#fd9672636e8d7a91275e5e0b8b88a34494336e5a"
|
||||
dependencies = [
|
||||
"fluence-sdk-macro 0.2.9 (git+https://github.com/fluencelabs/rust-sdk)",
|
||||
"log",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-wit"
|
||||
version = "0.2.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9c68c4d07e821e1be23b01c278acdae4e825d03c46879f453426ea3160b3e25"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk#fd9672636e8d7a91275e5e0b8b88a34494336e5a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -776,7 +775,8 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "fluence-sdk-wit"
|
||||
version = "0.2.9"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk#fd9672636e8d7a91275e5e0b8b88a34494336e5a"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9c68c4d07e821e1be23b01c278acdae4e825d03c46879f453426ea3160b3e25"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -1600,9 +1600,9 @@ checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7"
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.4.2"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"
|
||||
checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85"
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
@ -1634,9 +1634,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2940c75beb4e3bf3a494cef919a747a2cb81e52571e212bfbd185074add7208a"
|
||||
checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"new_debug_unreachable",
|
||||
@ -1687,9 +1687,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
|
||||
checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
@ -48,12 +48,12 @@ impl<'i> super::ExecutableInstruction<'i> for Call<'i> {
|
||||
Ok(parsed_call) => parsed_call,
|
||||
// to support lazy variable evaluation
|
||||
Err(VariableNotFound(variable_name)) => {
|
||||
log::info!(r#"variable with name "{}" not found, waiting"#, variable_name);
|
||||
log::trace!(r#"variable with name "{}" not found, waiting"#, variable_name);
|
||||
exec_ctx.subtree_complete = false;
|
||||
return Ok(());
|
||||
}
|
||||
Err(VariableNotInJsonPath(variable, json_path, json_path_err)) => {
|
||||
log::info!(
|
||||
log::trace!(
|
||||
r#"variable not found with json path "{}" in {:?} with error "{:?}", waiting"#,
|
||||
json_path,
|
||||
variable,
|
||||
|
@ -91,7 +91,7 @@ impl<'i> ParsedCall<'i> {
|
||||
set_local_call_result(self.output, exec_ctx, result.clone())?;
|
||||
|
||||
let new_evidence_state = EvidenceState::Call(CallResult::Executed(result));
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: EVIDENCE_CHANGING,
|
||||
" adding new call evidence state {:?}",
|
||||
new_evidence_state
|
||||
@ -110,7 +110,7 @@ impl<'i> ParsedCall<'i> {
|
||||
use crate::call_evidence::EvidenceState::*;
|
||||
|
||||
if call_ctx.current_subtree_size == 0 {
|
||||
log::info!(target: EVIDENCE_CHANGING, " previous call evidence state wasn't found");
|
||||
log::trace!(target: EVIDENCE_CHANGING, " previous call evidence state wasn't found");
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ impl<'i> ParsedCall<'i> {
|
||||
// and it's been checked previously
|
||||
let prev_state = call_ctx.current_path.pop_front().unwrap();
|
||||
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: EVIDENCE_CHANGING,
|
||||
" previous call evidence state found {:?}",
|
||||
prev_state
|
||||
|
@ -72,7 +72,7 @@ pub(super) fn set_remote_call_result<'i>(
|
||||
exec_ctx.subtree_complete = false;
|
||||
|
||||
let new_evidence_state = EvidenceState::Call(CallResult::RequestSent(exec_ctx.current_peer_id.clone()));
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: EVIDENCE_CHANGING,
|
||||
" adding new call evidence state {:?}",
|
||||
new_evidence_state
|
||||
|
@ -55,7 +55,7 @@ impl<'i> ExecutableInstruction<'i> for Instruction<'i> {
|
||||
#[macro_export]
|
||||
macro_rules! log_instruction {
|
||||
($instr_name:expr, $exec_ctx:expr, $call_ctx:expr) => {
|
||||
log::info!(target: crate::log_targets::INSTRUCTION, "> {}", stringify!($instr_name));
|
||||
log::debug!(target: crate::log_targets::INSTRUCTION, "> {}", stringify!($instr_name));
|
||||
|
||||
let mut data_cache_log = String::from(" data cache:");
|
||||
if $exec_ctx.data_cache.is_empty() {
|
||||
@ -65,29 +65,29 @@ macro_rules! log_instruction {
|
||||
data_cache_log.push_str(&format!("\n {} => {}", key, value));
|
||||
}
|
||||
|
||||
log::info!(target: crate::log_targets::DATA_CACHE, "{}", data_cache_log);
|
||||
log::info!(
|
||||
log::trace!(target: crate::log_targets::DATA_CACHE, "{}", data_cache_log);
|
||||
log::trace!(
|
||||
target: crate::log_targets::NEXT_PEER_PKS,
|
||||
" next peers pk: {:?}",
|
||||
$exec_ctx.next_peer_pks
|
||||
);
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: crate::log_targets::SUBTREE_COMPLETE,
|
||||
" subtree complete: {}",
|
||||
$exec_ctx.subtree_complete
|
||||
);
|
||||
|
||||
log::info!(
|
||||
log::debug!(
|
||||
target: crate::log_targets::CALL_EVIDENCE_PATH,
|
||||
" current call evidence path: {:?}",
|
||||
$call_ctx.current_path
|
||||
);
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: crate::log_targets::SUBTREE_ELEMENTS,
|
||||
" subtree elements count: {:?}",
|
||||
$call_ctx.current_subtree_size
|
||||
);
|
||||
log::info!(
|
||||
log::debug!(
|
||||
target: crate::log_targets::NEW_CALL_EVIDENCE_PATH,
|
||||
" new call evidence path: {:?}",
|
||||
$call_ctx.new_path
|
||||
|
@ -81,7 +81,7 @@ fn extract_subtree_sizes(call_ctx: &mut CallEvidenceCtx) -> Result<(usize, usize
|
||||
}
|
||||
call_ctx.current_subtree_size -= 1;
|
||||
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: EVIDENCE_CHANGING,
|
||||
" previous call evidence state was found {:?}",
|
||||
call_ctx.current_path[0]
|
||||
@ -157,7 +157,7 @@ fn update_par_state(
|
||||
*right = new_subtree_size;
|
||||
}
|
||||
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: EVIDENCE_CHANGING,
|
||||
" set {} par subtree size to {}",
|
||||
subtree_type,
|
||||
|
@ -19,7 +19,7 @@ use wasm_bindgen::prelude::*;
|
||||
|
||||
pub(crate) fn call_service(service_id: String, fn_name: String, args: String) -> super::CallServiceResult {
|
||||
let result = call_service_impl(service_id, fn_name, args);
|
||||
log::info!("result {}", result);
|
||||
log::trace!("result {}", result);
|
||||
serde_json::from_str(&result).expect("Cannot parse CallServiceResult")
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ pub(crate) fn merge_call_paths(
|
||||
&mut merged_path,
|
||||
)?;
|
||||
|
||||
log::info!(target: EVIDENCE_PATH_MERGE, "merged path: {:?}", merged_path);
|
||||
log::trace!(target: EVIDENCE_PATH_MERGE, "merged path: {:?}", merged_path);
|
||||
|
||||
Ok(merged_path)
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ use crate::StepperOutcome;
|
||||
use crate::STEPPER_SUCCESS;
|
||||
|
||||
pub fn execute_aqua(init_peer_id: String, aqua: String, prev_data: String, data: String) -> StepperOutcome {
|
||||
log::info!(
|
||||
log::trace!(
|
||||
"aquamarine version is {}, init user id is {}",
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
init_peer_id
|
||||
|
@ -48,7 +48,7 @@ pub(super) fn prepare<'i>(
|
||||
|
||||
let aqua: Instruction<'i> = *air_parser::parse(raw_aqua).map_err(|msg| AquamarineError::AIRParseError(msg))?;
|
||||
|
||||
log::info!(
|
||||
log::trace!(
|
||||
target: RUN_PARAMS,
|
||||
"aqua: {:?}\nprev_path: {:?}\ncurrent_path: {:?}",
|
||||
aqua,
|
||||
@ -69,7 +69,7 @@ pub(super) fn make_contexts(
|
||||
use AquamarineError::CurrentPeerIdEnvError as EnvError;
|
||||
|
||||
let current_peer_id = get_current_peer_id().map_err(|e| EnvError(e, String::from("CURRENT_PEER_ID")))?;
|
||||
log::info!(target: RUN_PARAMS, "current peer id {}", current_peer_id);
|
||||
log::trace!(target: RUN_PARAMS, "current peer id {}", current_peer_id);
|
||||
|
||||
let exec_ctx = ExecutionCtx::new(current_peer_id, init_peer_id);
|
||||
let current_path = merge_call_paths(prev_path, path)?;
|
||||
|
Loading…
Reference in New Issue
Block a user