Use LOG_TARGET in consensus related crates (#12875)

* Use shared LOG_TARGET in consensus related crates
* Rename target from "afg" to "grandpa"
This commit is contained in:
Davide Galassi
2022-12-14 14:56:17 +01:00
committed by GitHub
parent 3e0a1904b7
commit 391adaf443
31 changed files with 343 additions and 247 deletions
@@ -20,6 +20,7 @@
use crate::{
aura_err, authorities, find_pre_digest, slot_author, AuthorityId, CompatibilityMode, Error,
LOG_TARGET,
};
use codec::{Codec, Decode, Encode};
use log::{debug, info, trace};
@@ -88,7 +89,7 @@ where
.map_err(Error::Client)?
{
info!(
target: "aura",
target: LOG_TARGET,
"Slot author is equivocating at slot {} with headers {:?} and {:?}",
slot,
equivocation_proof.first_header.hash(),
@@ -256,7 +257,7 @@ where
block.body = Some(inner_body);
}
trace!(target: "aura", "Checked {:?}; importing.", pre_header);
trace!(target: LOG_TARGET, "Checked {:?}; importing.", pre_header);
telemetry!(
self.telemetry;
CONSENSUS_TRACE;
@@ -272,7 +273,7 @@ where
Ok((block, None))
},
CheckedHeader::Deferred(a, b) => {
debug!(target: "aura", "Checking {:?} failed; {:?}, {:?}.", hash, a, b);
debug!(target: LOG_TARGET, "Checking {:?} failed; {:?}, {:?}.", hash, a, b);
telemetry!(
self.telemetry;
CONSENSUS_DEBUG;