checkpoint

This commit is contained in:
John Smith
2022-09-06 18:59:41 -04:00
parent ca6c616d66
commit a12d8da6d1
9 changed files with 103 additions and 10 deletions

View File

@@ -96,6 +96,12 @@ impl<S: Subscriber + for<'a> registry::LookupSpan<'a>> Layer<S> for ApiTracingLa
let message = format!("{} {}", origin, recorder);
let backtrace = if log_level <= VeilidLogLevel::Error {
Some(std::backtrace::Backtrace)
} else {
None
};
(inner.update_callback)(VeilidUpdate::Log(VeilidStateLog { log_level, message }))
}
}

View File

@@ -219,6 +219,7 @@ impl fmt::Display for VeilidLogLevel {
pub struct VeilidStateLog {
pub log_level: VeilidLogLevel,
pub message: String,
pub backtrace: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]