tracing capture interface
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
1bb4021b90
commit
aa34021b27
15 changed files with 284 additions and 27 deletions
12
src/core/log/capture/guard.rs
Normal file
12
src/core/log/capture/guard.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use super::Capture;
|
||||
|
||||
/// Capture instance scope guard.
|
||||
pub struct Guard {
|
||||
pub(super) capture: Arc<Capture>,
|
||||
}
|
||||
|
||||
impl Drop for Guard {
|
||||
fn drop(&mut self) { self.capture.stop(); }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue