mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
grandpa: remove deprecated afg log target (#13064)
* grandpa: remove deprecated afg log target * grandpa: define log targets in primitives
This commit is contained in:
@@ -76,6 +76,9 @@ use sp_application_crypto::AppKey;
|
||||
use sp_blockchain::{Error as ClientError, HeaderBackend, HeaderMetadata, Result as ClientResult};
|
||||
use sp_consensus::SelectChain;
|
||||
use sp_core::crypto::ByteArray;
|
||||
use sp_finality_grandpa::{
|
||||
AuthorityList, AuthoritySignature, SetId, CLIENT_LOG_TARGET as LOG_TARGET,
|
||||
};
|
||||
use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
@@ -93,8 +96,6 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
const LOG_TARGET: &str = "grandpa";
|
||||
|
||||
// utility logging macro that takes as first argument a conditional to
|
||||
// decide whether to log under debug or info level (useful to restrict
|
||||
// logging under initial sync).
|
||||
@@ -142,7 +143,6 @@ pub use voting_rule::{
|
||||
use aux_schema::PersistentData;
|
||||
use communication::{Network as NetworkT, NetworkBridge};
|
||||
use environment::{Environment, VoterSetState};
|
||||
use sp_finality_grandpa::{AuthorityList, AuthoritySignature, SetId};
|
||||
use until_imported::UntilGlobalMessageBlocksImported;
|
||||
|
||||
// Re-export these two because it's just so damn convenient.
|
||||
|
||||
@@ -377,7 +377,7 @@ mod tests {
|
||||
fn test_logger_filters() {
|
||||
run_test_in_another_process("test_logger_filters", || {
|
||||
let test_directives =
|
||||
"afg=debug,sync=trace,client=warn,telemetry,something-with-dash=error";
|
||||
"grandpa=debug,sync=trace,client=warn,telemetry,something-with-dash=error";
|
||||
init_logger(&test_directives);
|
||||
|
||||
tracing::dispatcher::get_default(|dispatcher| {
|
||||
@@ -402,9 +402,9 @@ mod tests {
|
||||
dispatcher.enabled(&metadata)
|
||||
};
|
||||
|
||||
assert!(test_filter("afg", Level::INFO));
|
||||
assert!(test_filter("afg", Level::DEBUG));
|
||||
assert!(!test_filter("afg", Level::TRACE));
|
||||
assert!(test_filter("grandpa", Level::INFO));
|
||||
assert!(test_filter("grandpa", Level::DEBUG));
|
||||
assert!(!test_filter("grandpa", Level::TRACE));
|
||||
|
||||
assert!(test_filter("sync", Level::TRACE));
|
||||
assert!(test_filter("client", Level::WARN));
|
||||
|
||||
Reference in New Issue
Block a user