Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
25
third-party/vendor/tracing-subscriber/tests/registry_with_subscriber.rs
vendored
Normal file
25
third-party/vendor/tracing-subscriber/tests/registry_with_subscriber.rs
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#![cfg(feature = "registry")]
|
||||
use tracing_futures::{Instrument, WithSubscriber};
|
||||
use tracing_subscriber::prelude::*;
|
||||
|
||||
#[tokio::test]
|
||||
async fn future_with_subscriber() {
|
||||
tracing_subscriber::registry().init();
|
||||
let span = tracing::info_span!("foo");
|
||||
let _e = span.enter();
|
||||
let span = tracing::info_span!("bar");
|
||||
let _e = span.enter();
|
||||
tokio::spawn(
|
||||
async {
|
||||
async {
|
||||
let span = tracing::Span::current();
|
||||
println!("{:?}", span);
|
||||
}
|
||||
.instrument(tracing::info_span!("hi"))
|
||||
.await
|
||||
}
|
||||
.with_subscriber(tracing_subscriber::registry()),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue