2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-16 10:49:55 +00:00
async-std/examples/logging.rs

16 lines
299 B
Rust
Raw Normal View History

2019-08-08 12:44:48 +00:00
//! Prints the runtime's execution log on the standard output.
use async_std::task;
fn main() {
femme::with_level(log::LevelFilter::Trace);
2019-08-08 12:44:48 +00:00
task::block_on(async {
let handle = task::spawn(async {
log::info!("Hello world!");
});
handle.await;
})
}