Encapsulate log::Level so counter macro users don't need to use it
This commit is contained in:
parent
5f5725a4ea
commit
897279eddb
|
@ -55,10 +55,10 @@ macro_rules! inc_new_counter {
|
|||
#[macro_export]
|
||||
macro_rules! inc_new_counter_info {
|
||||
($name:expr, $count:expr) => {{
|
||||
inc_new_counter!($name, $count, Level::Info, 0);
|
||||
inc_new_counter!($name, $count, log::Level::Info, 0);
|
||||
}};
|
||||
($name:expr, $count:expr, $lograte:expr) => {{
|
||||
inc_new_counter!($name, $count, Level::Info, $lograte);
|
||||
inc_new_counter!($name, $count, log::Level::Info, $lograte);
|
||||
}};
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::bank::{BankError, Result};
|
|||
use crate::runtime::has_duplicates;
|
||||
use bincode::serialize;
|
||||
use hashbrown::{HashMap, HashSet};
|
||||
use log::{debug, Level};
|
||||
use log::debug;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::hash::{hash, Hash};
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::runtime::{self, RuntimeError};
|
|||
use crate::status_cache::StatusCache;
|
||||
use bincode::serialize;
|
||||
use hashbrown::HashMap;
|
||||
use log::{debug, info, warn, Level};
|
||||
use log::{debug, info, warn};
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::bpf_loader;
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::result::{Error, Result};
|
|||
use crate::service::Service;
|
||||
use crate::sigverify_stage::VerifiedPackets;
|
||||
use bincode::deserialize;
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_runtime::bank::{self, Bank, BankError};
|
||||
use solana_sdk::hash::Hash;
|
||||
|
|
|
@ -2,7 +2,6 @@ use crate::bank_forks::BankForks;
|
|||
use crate::blocktree::Blocktree;
|
||||
use crate::entry::{Entry, EntrySlice};
|
||||
use crate::leader_scheduler::LeaderScheduler;
|
||||
use log::Level;
|
||||
use rayon::prelude::*;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_runtime::bank::{Bank, BankError, Result};
|
||||
|
|
|
@ -9,7 +9,6 @@ use crate::erasure::CodingGenerator;
|
|||
use crate::packet::index_blobs;
|
||||
use crate::result::{Error, Result};
|
||||
use crate::service::Service;
|
||||
use log::Level;
|
||||
use rayon::prelude::*;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
|
|
|
@ -3,7 +3,6 @@ use crate::packet;
|
|||
use crate::result::Result;
|
||||
use crate::service::Service;
|
||||
use crate::streamer::PacketSender;
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::leader_scheduler::LeaderScheduler;
|
|||
use crate::packet::{SharedBlob, BLOB_HEADER_SIZE};
|
||||
use crate::result::Result;
|
||||
use crate::streamer::BlobSender;
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
|
|
@ -14,7 +14,6 @@ use crate::service::Service;
|
|||
use crate::storage_stage::StorageState;
|
||||
use crate::tpu::Tpu;
|
||||
use crate::tvu::{Sockets, Tvu, TvuRotationInfo, TvuRotationReceiver};
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::genesis_block::GenesisBlock;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
|
|
@ -3,7 +3,6 @@ use crate::recvmmsg::{recv_mmsg, NUM_RCVMMSGS};
|
|||
use crate::result::{Error, Result};
|
||||
use bincode::{serialize, serialize_into};
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use log::Level;
|
||||
use serde::Serialize;
|
||||
use solana_metrics::counter::Counter;
|
||||
pub use solana_sdk::packet::PACKET_DATA_SIZE;
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::result::{Error, Result};
|
|||
use crate::rpc_subscriptions::RpcSubscriptions;
|
||||
use crate::service::Service;
|
||||
use crate::tvu::{TvuRotationInfo, TvuRotationSender};
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
use solana_runtime::bank::Bank;
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::result::{Error, Result};
|
|||
use crate::service::Service;
|
||||
use crate::streamer::BlobReceiver;
|
||||
use crate::window_service::WindowService;
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
use std::net::UdpSocket;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
use crate::packet::{Packet, SharedPackets};
|
||||
use crate::result::Result;
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::shortvec::decode_len;
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::result::{Error, Result};
|
|||
use crate::service::Service;
|
||||
use crate::sigverify;
|
||||
use crate::streamer::{self, PacketReceiver};
|
||||
use log::Level;
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::cluster_info::ClusterInfo;
|
|||
use crate::contact_info::ContactInfo;
|
||||
use crate::service::Service;
|
||||
use crate::streamer::{self, PacketReceiver};
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use std::net::{SocketAddr, UdpSocket};
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::repair_service::RepairService;
|
|||
use crate::result::{Error, Result};
|
||||
use crate::service::Service;
|
||||
use crate::streamer::{BlobReceiver, BlobSender};
|
||||
use log::Level;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
|
Loading…
Reference in New Issue