Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use fil_logger instead of pretty_env_logger
The log output changes and now looks like the one [IPFS go-log] is producing. You can also toggle the output to JSON with setting the environment variable `GOLOG_LOG_FMT=json`. Example for console outpute: ```console $ RUST_LOG=debug cargo run --example stacked -- --size 16 Finished dev [unoptimized + debuginfo] target(s) in 0.15s Running `/home/vmx/src/pl/filecoin/rust-fil-proofs/target/debug/examples/stacked --size 16` 2019-11-14T19:42:35.240 INFO stacked > hasher: pedersen 2019-11-14T19:42:35.240 INFO stacked > data size: 16 kB 2019-11-14T19:42:35.240 INFO stacked > m: 6 2019-11-14T19:42:35.240 INFO stacked > expansion_degree: 8 2019-11-14T19:42:35.240 INFO stacked > layer_challenges: LayerChallenges { layers: 10, max_count: 1 } 2019-11-14T19:42:35.240 INFO stacked > layers: 10 2019-11-14T19:42:35.240 INFO stacked > partitions: 1 2019-11-14T19:42:35.240 INFO stacked > circuit: false 2019-11-14T19:42:35.240 INFO stacked > groth: false 2019-11-14T19:42:35.240 INFO stacked > bench: false 2019-11-14T19:42:35.241 INFO stacked > running setup 2019-11-14T19:42:35.241 INFO stacked > setup complete 2019-11-14T19:42:35.241 INFO stacked > generating zeroed data 2019-11-14T19:42:35.241 INFO stacked > running replicate 2019-11-14T19:42:35.241 INFO storage_proofs::stacked::proof > building merkle tree for the original data 2019-11-14T19:42:35.241 INFO storage_proofs::stacked::proof > generate labels 2019-11-14T19:42:35.242 INFO storage_proofs::stacked::proof > hashing columns with 7 chunks 2019-11-14T19:42:35.243 INFO storage_proofs::stacked::proof > generating layer: 1 2019-11-14T19:42:35.636 INFO storage_proofs::stacked::proof > generating layer: 2 2019-11-14T19:42:36.041 INFO storage_proofs::stacked::proof > generating layer: 3 2019-11-14T19:42:36.443 INFO storage_proofs::stacked::proof > generating layer: 4 2019-11-14T19:42:36.843 INFO storage_proofs::stacked::proof > generating layer: 5 2019-11-14T19:42:37.243 INFO storage_proofs::stacked::proof > generating layer: 6 2019-11-14T19:42:37.648 INFO storage_proofs::stacked::proof > generating layer: 7 2019-11-14T19:42:38.060 INFO storage_proofs::stacked::proof > generating layer: 8 2019-11-14T19:42:38.460 INFO storage_proofs::stacked::proof > generating layer: 9 2019-11-14T19:42:38.859 INFO storage_proofs::stacked::proof > generating layer: 10 2019-11-14T19:43:36.429 INFO storage_proofs::stacked::proof > Labels generated 2019-11-14T19:43:36.429 INFO storage_proofs::stacked::proof > encoding data 2019-11-14T19:43:36.429 INFO storage_proofs::stacked::proof > building tree_c 2019-11-14T19:43:36.432 INFO storage_proofs::stacked::proof > building tree_r_last 2019-11-14T19:43:36.965 INFO storage_proofs::stacked::proof > tree_c done 2019-11-14T19:43:36.965 INFO storage_proofs::stacked::proof > tree_r_last done 2019-11-14T19:43:36.968 INFO stacked > replication_time: 61.727274001s 2019-11-14T19:43:36.968 INFO stacked > replication_time/byte: 3.767533ms 2019-11-14T19:43:36.968 INFO stacked > replication_time/GiB: 4045357.755400192s 2019-11-14T19:43:36.969 INFO stacked > generating 1 partition proofs 2019-11-14T19:43:36.974 INFO stacked > vanilla_proving_time: 4.922457ms 2019-11-14T19:43:36.974 INFO stacked > sampling verifying (samples: 5) 2019-11-14T19:43:40.364 INFO stacked > Verification complete 2019-11-14T19:43:40.364 INFO stacked > average_vanilla_verifying_time: 0.678136971 seconds ``` Example for JSON output: ```console $ RUST_LOG=debug GOLOG_LOG_FMT=json cargo run --example stacked -- --size 16 Finished dev [unoptimized + debuginfo] target(s) in 0.15s Running `/home/vmx/src/pl/filecoin/rust-fil-proofs/target/debug/examples/stacked --size 16` {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:483","msg":"hasher: pedersen"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:160","msg":"data size: 16 kB"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:161","msg":"m: 6"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:162","msg":"expansion_degree: 8"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:163","msg":"layer_challenges: LayerChallenges { layers: 10, max_count: 1 }"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:164","msg":"layers: 10"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:165","msg":"partitions: 1"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:166","msg":"circuit: false"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:167","msg":"groth: false"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:168","msg":"bench: false"}" {"level":"info","ts":"2019-11-14T19:44:43.519+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:181","msg":"running setup"}" {"level":"info","ts":"2019-11-14T19:44:43.520+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:184","msg":"setup complete"}" {"level":"info","ts":"2019-11-14T19:44:43.520+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:115","msg":"generating zeroed data"}" {"level":"info","ts":"2019-11-14T19:44:43.520+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:198","msg":"running replicate"}" {"level":"info","ts":"2019-11-14T19:44:43.520+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:445","msg":"building merkle tree for the original data"}" {"level":"info","ts":"2019-11-14T19:44:43.520+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:244","msg":"generate labels"}" {"level":"info","ts":"2019-11-14T19:44:43.520+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:275","msg":"hashing columns with 7 chunks"}" {"level":"info","ts":"2019-11-14T19:44:43.521+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 1"}" {"level":"info","ts":"2019-11-14T19:44:43.921+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 2"}" {"level":"info","ts":"2019-11-14T19:44:44.346+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 3"}" {"level":"info","ts":"2019-11-14T19:44:44.755+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 4"}" {"level":"info","ts":"2019-11-14T19:44:45.161+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 5"}" {"level":"info","ts":"2019-11-14T19:44:45.568+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 6"}" {"level":"info","ts":"2019-11-14T19:44:45.969+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 7"}" {"level":"info","ts":"2019-11-14T19:44:46.375+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 8"}" {"level":"info","ts":"2019-11-14T19:44:46.781+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 9"}" {"level":"info","ts":"2019-11-14T19:44:47.189+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:311","msg":"generating layer: 10"}" {"level":"info","ts":"2019-11-14T19:45:45.272+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:406","msg":"Labels generated"}" {"level":"info","ts":"2019-11-14T19:45:45.273+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:460","msg":"encoding data"}" {"level":"info","ts":"2019-11-14T19:45:45.273+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:482","msg":"building tree_c"}" {"level":"info","ts":"2019-11-14T19:45:45.276+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:476","msg":"building tree_r_last"}" {"level":"info","ts":"2019-11-14T19:45:45.786+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:495","msg":"tree_c done"}" {"level":"info","ts":"2019-11-14T19:45:45.795+01:00","logger":"storage_proofs::stacked::proof","caller":"storage-proofs/src/stacked/proof.rs:497","msg":"tree_r_last done"}" {"level":"info","ts":"2019-11-14T19:45:45.797+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:216","msg":"replication_time: 62.277651547s"}" {"level":"info","ts":"2019-11-14T19:45:45.798+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:230","msg":"replication_time/byte: 3.801125ms"}" {"level":"info","ts":"2019-11-14T19:45:45.798+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:231","msg":"replication_time/GiB: 4081426.890752s"}" {"level":"info","ts":"2019-11-14T19:45:45.798+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:233","msg":"generating 1 partition proofs"}" {"level":"info","ts":"2019-11-14T19:45:45.802+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:248","msg":"vanilla_proving_time: 3.957739ms"}" {"level":"info","ts":"2019-11-14T19:45:45.802+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:253","msg":"sampling verifying (samples: 5)"}" {"level":"info","ts":"2019-11-14T19:45:49.456+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:270","msg":"Verification complete"}" {"level":"info","ts":"2019-11-14T19:45:49.456+01:00","logger":"stacked","caller":"filecoin-proofs/examples/stacked.rs:276","msg":"average_vanilla_verifying_time: 0.730860279 seconds"}" ``` [IPFS go-log]: https://github.com/ipfs/go-log
- Loading branch information