-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(crypto-helper): replace log crate with tracing;
- Loading branch information
1 parent
4c73780
commit 5f87462
Showing
7 changed files
with
164 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
use crypto_helper::App; | ||
use tracing_subscriber::fmt::format::Pretty; | ||
use tracing_subscriber::prelude::*; | ||
use tracing_subscriber::EnvFilter; | ||
use tracing_web::{performance_layer, MakeWebConsoleWriter}; | ||
|
||
fn main() { | ||
wasm_logger::init(wasm_logger::Config::default()); | ||
let fmt_layer = tracing_subscriber::fmt::layer() | ||
.with_ansi(false) | ||
.without_time() | ||
.with_writer(MakeWebConsoleWriter::new()); | ||
let perf_layer = performance_layer().with_details_from_fields(Pretty::default()); | ||
tracing_subscriber::registry() | ||
.with(fmt_layer) | ||
.with(perf_layer) | ||
.with(EnvFilter::from_default_env()) | ||
.init(); | ||
|
||
yew::Renderer::<App>::new().render(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
use crypto_helper::diff::{DiffTask, JsonCodec}; | ||
use tracing_subscriber::fmt::format::Pretty; | ||
use tracing_subscriber::prelude::*; | ||
use tracing_subscriber::EnvFilter; | ||
use tracing_web::{performance_layer, MakeWebConsoleWriter}; | ||
use yew_agent::Registrable; | ||
|
||
fn main() { | ||
wasm_logger::init(wasm_logger::Config::default()); | ||
let fmt_layer = tracing_subscriber::fmt::layer() | ||
.with_ansi(false) | ||
.without_time() | ||
.with_writer(MakeWebConsoleWriter::new()); | ||
let perf_layer = performance_layer().with_details_from_fields(Pretty::default()); | ||
tracing_subscriber::registry() | ||
.with(fmt_layer) | ||
.with(perf_layer) | ||
.with(EnvFilter::from_default_env()) | ||
.init(); | ||
|
||
DiffTask::registrar().encoding::<JsonCodec>().register(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#[macro_use] | ||
extern crate log; | ||
extern crate tracing; | ||
|
||
mod about; | ||
mod asn1; | ||
|