mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
Doc fixes for sc-telemetry & API struct rename (#7934)
* Doc fixes for sc-telemetry * Fix flag to disable log reloading * Forgot to reverse the conditions * Apply suggestion * Rename pattern to directives * Rename GlobalLoggerBuilder to LoggerBuilder * Return instead of expect * Use transparent outside the enum * Update client/tracing/src/logging/directives.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -33,9 +33,18 @@ where
|
||||
S: Subscriber + for<'a> LookupSpan<'a>,
|
||||
{
|
||||
fn new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>) {
|
||||
let span = ctx
|
||||
.span(id)
|
||||
.expect("new_span has been called for this span; qed");
|
||||
let span = match ctx.span(id) {
|
||||
Some(span) => span,
|
||||
None => {
|
||||
// this shouldn't happen!
|
||||
debug_assert!(
|
||||
false,
|
||||
"newly created span with ID {:?} did not exist in the registry; this is a bug!",
|
||||
id
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
if span.name() != PREFIX_LOG_SPAN {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user