Skip to content

Commit

Permalink
feat(logs): prints git metadata and platform info when zebrad starts …
Browse files Browse the repository at this point in the history
…up (#5200)

* adds info log with git & build metadata when zebrad starts up

* Update zebrad/src/application.rs

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
  • Loading branch information
arya2 and teor2345 authored Sep 20, 2022
1 parent 0db014d commit 6343b83
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zebrad/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl Application for ZebradApp {

builder = builder
.theme(theme)
.panic_section(metadata_section)
.panic_section(metadata_section.clone())
.issue_url(concat!(env!("CARGO_PKG_REPOSITORY"), "/issues/new"))
.issue_filter(|kind| match kind {
color_eyre::ErrorKind::NonRecoverable(error) => {
Expand Down Expand Up @@ -398,6 +398,11 @@ impl Application for ZebradApp {
}
components.push(Box::new(Tracing::new(tracing_config)?));

// Log git metadata and platform info when zebrad starts up
if is_server {
tracing::info!("Diagnostic {}", metadata_section);
}

// Activate the global span, so it's visible when we load the other
// components. Space is at a premium here, so we use an empty message,
// short commit hash, and the unique part of the network name.
Expand Down

0 comments on commit 6343b83

Please sign in to comment.