diff --git a/Cargo.lock b/Cargo.lock index f4da90f2..9ded3f9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2431,9 +2431,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" dependencies = [ "once_cell", ] @@ -2542,9 +2542,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "f7d40a22fd029e33300d8d89a5cc8ffce18bb7c587662f54629e94c9de5487f3" dependencies = [ "cfg-if 1.0.0", "log", diff --git a/examples/greeting/artifacts/greeting.wasm b/examples/greeting/artifacts/greeting.wasm index 82025d1d..511bbf2b 100755 Binary files a/examples/greeting/artifacts/greeting.wasm and b/examples/greeting/artifacts/greeting.wasm differ diff --git a/tools/repl/src/logger.rs b/tools/repl/src/logger.rs index c6611c8a..78ff51a9 100644 --- a/tools/repl/src/logger.rs +++ b/tools/repl/src/logger.rs @@ -14,14 +14,16 @@ * limitations under the License. */ +use fluence_sdk_main::WASM_LOG_ENV_NAME; + +use std::io::Write; +use std::env::var; + const WIT_MODULE_PATH: &str = "wasmer_interface_types_fl"; const RUST_LOG_ENV_NAME: &str = "RUST_LOG"; pub(super) fn init_logger() { - use std::io::Write; - use std::env::var; use log::LevelFilter::Info; - use fluence_sdk_main::WASM_LOG_ENV_NAME; match (var(RUST_LOG_ENV_NAME), var(WASM_LOG_ENV_NAME)) { (Ok(_), _) => {} @@ -37,7 +39,8 @@ pub(super) fn init_logger() { Some(module_path) if module_path.starts_with(WIT_MODULE_PATH) => { writeln!(buf, "[host] {}", record.args()) } - // because of the log_utf8_string implementation, log from a wasm module always has module path + // due to the log_utf8_string implementation, + // a log message from a Wasm module always has module path None => writeln!(buf, "[host] {}", record.args()), Some(module_path) => writeln!(buf, "[{}] {}", module_path, record.args()), } diff --git a/tools/repl/src/repl.rs b/tools/repl/src/repl.rs index bfcce666..7d0e6e60 100644 --- a/tools/repl/src/repl.rs +++ b/tools/repl/src/repl.rs @@ -16,13 +16,13 @@ mod print_state; +use print_state::print_envs; +use print_state::print_fs_state; use crate::ReplResult; use fluence_app_service::AppService; use fluence_app_service::FaaSModuleConfig; use fluence_app_service::TomlAppServiceConfig; -use print_state::print_envs; -use print_state::print_fs_state; use std::collections::HashMap; use std::fs;