Skip to content

Commit

Permalink
Merge pull request #1318 from Phala-Network/fix-leak
Browse files Browse the repository at this point in the history
pruntime: Fix memory leak in logging
  • Loading branch information
kvinwang authored Jun 29, 2023
2 parents efc842e + b0b830d commit 926806e
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 926806e

Please sign in to comment.