Skip to content

Commit

Permalink
sanitized-logger: Forward all trait methods to fmt::Subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Jun 21, 2023
1 parent 77dbf62 commit fcc9afb
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions crates/phala-sanitized-logger/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,35 @@ impl Subscriber for SanitizedSubscriber {
fn exit(&self, span: &span::Id) {
self.0.exit(span)
}

fn event_enabled(&self, event: &Event<'_>) -> bool {
self.0.event_enabled(event)
}

fn current_span(&self) -> span::Current {
self.0.current_span()
}

fn clone_span(&self, id: &span::Id) -> span::Id {
self.0.clone_span(id)
}

fn try_close(&self, id: span::Id) -> bool {
self.0.try_close(id)
}

fn max_level_hint(&self) -> Option<LevelFilter> {
self.0.max_level_hint()
}

fn register_callsite(&self, metadata: &'static Metadata<'static>) -> tracing_core::Interest {
self.0.register_callsite(metadata)
}

fn drop_span(&self, id: span::Id) {
#[allow(deprecated)]
self.0.drop_span(id);
}
}

pub fn init_subscriber(sanitized: bool) {
Expand Down

0 comments on commit fcc9afb

Please sign in to comment.