update examples with new rust-sdk logger

This commit is contained in:
vms 2020-10-30 17:07:29 +03:00
parent acf6450d22
commit d52eb4432f
6 changed files with 28 additions and 13 deletions

16
Cargo.lock generated
View File

@ -737,7 +737,7 @@ dependencies = [
[[package]] [[package]]
name = "fluence" name = "fluence"
version = "0.2.8" version = "0.2.8"
source = "git+https://github.com/fluencelabs/rust-sdk#8c0a02916519872c3d6073de16c950d10da0b2f4" source = "git+https://github.com/fluencelabs/rust-sdk#a6c587db0b6f22c3d3af81f10b187f148f8e9d30"
dependencies = [ dependencies = [
"fluence-sdk-macro 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)", "fluence-sdk-macro 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)",
"fluence-sdk-main 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)", "fluence-sdk-main 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)",
@ -792,7 +792,7 @@ dependencies = [
[[package]] [[package]]
name = "fluence-sdk-macro" name = "fluence-sdk-macro"
version = "0.2.8" version = "0.2.8"
source = "git+https://github.com/fluencelabs/rust-sdk#8c0a02916519872c3d6073de16c950d10da0b2f4" source = "git+https://github.com/fluencelabs/rust-sdk#a6c587db0b6f22c3d3af81f10b187f148f8e9d30"
dependencies = [ dependencies = [
"fluence-sdk-wit 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)", "fluence-sdk-wit 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)",
] ]
@ -811,7 +811,7 @@ dependencies = [
[[package]] [[package]]
name = "fluence-sdk-main" name = "fluence-sdk-main"
version = "0.2.8" version = "0.2.8"
source = "git+https://github.com/fluencelabs/rust-sdk#8c0a02916519872c3d6073de16c950d10da0b2f4" source = "git+https://github.com/fluencelabs/rust-sdk#a6c587db0b6f22c3d3af81f10b187f148f8e9d30"
dependencies = [ dependencies = [
"fluence-sdk-macro 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)", "fluence-sdk-macro 0.2.8 (git+https://github.com/fluencelabs/rust-sdk)",
"log", "log",
@ -835,7 +835,7 @@ dependencies = [
[[package]] [[package]]
name = "fluence-sdk-wit" name = "fluence-sdk-wit"
version = "0.2.8" version = "0.2.8"
source = "git+https://github.com/fluencelabs/rust-sdk#8c0a02916519872c3d6073de16c950d10da0b2f4" source = "git+https://github.com/fluencelabs/rust-sdk#a6c587db0b6f22c3d3af81f10b187f148f8e9d30"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1524,9 +1524,9 @@ dependencies = [
[[package]] [[package]]
name = "num-integer" name = "num-integer"
version = "0.1.43" version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"num-traits", "num-traits",
@ -1534,9 +1534,9 @@ dependencies = [
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.12" version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
dependencies = [ dependencies = [
"autocfg", "autocfg",
] ]

View File

@ -26,7 +26,10 @@ const IPFS_ADDR_ENV_NAME: &str = "IPFS_ADDR";
const TIMEOUT_ENV_NAME: &str = "timeout"; const TIMEOUT_ENV_NAME: &str = "timeout";
pub fn main() { pub fn main() {
WasmLogger::init_with_level(log::Level::Info).unwrap(); WasmLogger::new()
.with_log_level(log::Level::Info)
.build()
.unwrap();
} }
/// Put file from specified path to IPFS and return its hash. /// Put file from specified path to IPFS and return its hash.

View File

@ -23,7 +23,10 @@ use std::path::PathBuf;
const RPC_TMP_FILEPATH: &str = "/tmp/ipfs_rpc_file"; const RPC_TMP_FILEPATH: &str = "/tmp/ipfs_rpc_file";
pub fn main() { pub fn main() {
WasmLogger::init_with_level(log::Level::Info).unwrap(); WasmLogger::new()
.with_log_level(log::Level::Info)
.build()
.unwrap();
} }
#[fce] #[fce]

View File

@ -19,7 +19,10 @@ use fluence::WasmLogger;
/// Log level can be changed by `RUST_LOG` env as well. /// Log level can be changed by `RUST_LOG` env as well.
pub fn main() { pub fn main() {
WasmLogger::init_with_level(log::Level::Info).unwrap(); WasmLogger::new()
.with_log_level(log::Level::Info)
.build()
.unwrap();
} }
#[fce] #[fce]

View File

@ -23,7 +23,10 @@ const RPC_TMP_FILEPATH: &str = "/sites/";
/// Log level can be changed by `RUST_LOG` env as well. /// Log level can be changed by `RUST_LOG` env as well.
pub fn main() { pub fn main() {
WasmLogger::init_with_level(log::Level::Info).unwrap(); WasmLogger::new()
.with_log_level(log::Level::Info)
.build()
.unwrap();
} }
/// You can read or write files from the file system if there is permission to use directories described in `Config.toml`. /// You can read or write files from the file system if there is permission to use directories described in `Config.toml`.

View File

@ -18,7 +18,10 @@ use fluence::fce;
use fluence::WasmLogger; use fluence::WasmLogger;
pub fn main() { pub fn main() {
WasmLogger::init_with_level(log::Level::Info).unwrap(); WasmLogger::new()
.with_log_level(log::Level::Info)
.build()
.unwrap();
} }
/// Combining of modules: `curl` and `local_storage`. /// Combining of modules: `curl` and `local_storage`.