mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
sc-tracing: Only print events for whitelisted targets (#14487)
* sc-tracing: Only print events for whitelisted targets We should only print events for whitelisted targets, otherwise we may run into some stack overflow while printing the event. * Update client/tracing/src/lib.rs Co-authored-by: Koute <koute@users.noreply.github.com> * Fix --------- Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
@@ -328,6 +328,10 @@ where
|
||||
}
|
||||
|
||||
fn on_event(&self, event: &Event<'_>, ctx: Context<S>) {
|
||||
if !self.check_target(event.metadata().target(), &event.metadata().level()) {
|
||||
return
|
||||
}
|
||||
|
||||
let parent_id = event.parent().cloned().or_else(|| {
|
||||
if event.is_contextual() {
|
||||
ctx.lookup_current().map(|span| span.id())
|
||||
|
||||
Reference in New Issue
Block a user