mirror of
https://github.com/fluencelabs/marine.git
synced 2024-12-12 06:45:32 +00:00
Use log instead of println in log_utf8_string (#4)
This commit is contained in:
parent
a85ac4ff14
commit
e2cf6089df
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -395,6 +395,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"cmd_lib",
|
||||
"fce",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
|
@ -17,6 +17,7 @@ serde = { version = "1.0.111", features = ["derive"] }
|
||||
serde_json = "1.0.53"
|
||||
serde_derive = "1.0.111"
|
||||
cmd_lib = "0.7.8"
|
||||
log = "0.4.8"
|
||||
|
||||
[patch.'https://github.com/fluencelabs/wasmer']
|
||||
wasmer-wasi = { path = "lib/wasi" }
|
||||
|
@ -32,8 +32,8 @@ pub(super) fn log_utf8_string(ctx: &mut Ctx, offset: i32, size: i32) {
|
||||
|
||||
let wasm_ptr = WasmPtr::<u8, Array>::new(offset as _);
|
||||
match wasm_ptr.get_utf8_string(ctx.memory(0), size as _) {
|
||||
Some(msg) => print!("{}", msg),
|
||||
None => println!("ipfs node logger: incorrect UTF8 string's been supplied to logger"),
|
||||
Some(msg) => log::info!("{}", msg),
|
||||
None => log::warn!("ipfs node logger: incorrect UTF8 string's been supplied to logger"),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user