mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Integrate tracing (#6339)
Tracing Integration
- [reference](5bbf1859e9/projects/project-ideas.md (L297))
- [x] replace slog & log with tracing throughout the codebase
- [x] implement custom crit log
- [x] make relevant changes in the formatter
- [x] replace sloggers
- [x] re-write SSE logging components
cc: @macladson @eserilev
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
use bls::PublicKeyBytes;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use slog::warn;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::io::{prelude::*, BufReader};
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
use bls::PublicKeyBytes;
|
||||
use tracing::warn;
|
||||
use types::{graffiti::GraffitiString, Graffiti};
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -108,7 +107,6 @@ fn read_line(line: &str) -> Result<(Option<PublicKeyBytes>, Graffiti), Error> {
|
||||
// the next block produced by the validator with the given public key.
|
||||
pub fn determine_graffiti(
|
||||
validator_pubkey: &PublicKeyBytes,
|
||||
log: &slog::Logger,
|
||||
graffiti_file: Option<GraffitiFile>,
|
||||
validator_definition_graffiti: Option<Graffiti>,
|
||||
graffiti_flag: Option<Graffiti>,
|
||||
@@ -117,7 +115,7 @@ pub fn determine_graffiti(
|
||||
.and_then(|mut g| match g.load_graffiti(validator_pubkey) {
|
||||
Ok(g) => g,
|
||||
Err(e) => {
|
||||
warn!(log, "Failed to read graffiti file"; "error" => ?e);
|
||||
warn!(error = ?e, "Failed to read graffiti file");
|
||||
None
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user