Standardize on 'use log::*' for easy access to all log level macros
This commit is contained in:
parent
855f1823a4
commit
0dc5af62ff
|
@ -1,5 +1,5 @@
|
|||
use clap::{crate_version, App, Arg};
|
||||
use log::info;
|
||||
use log::*;
|
||||
use solana_drone::drone::{Drone, DRONE_PORT};
|
||||
use solana_drone::socketaddr;
|
||||
use solana_sdk::signature::read_keypair;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
use bincode::{deserialize, serialize};
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use log::{debug, info, trace, warn};
|
||||
use log::*;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_metrics;
|
||||
use solana_metrics::influxdb;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{influxdb, submit};
|
||||
use log::{info, log_enabled};
|
||||
use log::*;
|
||||
use solana_sdk::timing;
|
||||
use std::env;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//! The `netutil` module assists with networking
|
||||
use log::trace;
|
||||
use log::*;
|
||||
use nix::sys::socket::setsockopt;
|
||||
use nix::sys::socket::sockopt::{ReuseAddr, ReusePort};
|
||||
use pnet_datalink as datalink;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use bincode::deserialize;
|
||||
use log::info;
|
||||
use log::*;
|
||||
use solana_runtime::bank::Bank;
|
||||
use solana_sdk::genesis_block::GenesisBlock;
|
||||
use solana_sdk::hash::{hash, Hash};
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::bank::{BankError, Result};
|
|||
use crate::runtime::has_duplicates;
|
||||
use bincode::serialize;
|
||||
use hashbrown::{HashMap, HashSet};
|
||||
use log::debug;
|
||||
use log::*;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::hash::{hash, Hash};
|
||||
|
|
|
@ -225,7 +225,7 @@ where
|
|||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use super::*;
|
||||
use log::info;
|
||||
use log::*;
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_sdk::timing::{duration_as_ms, duration_as_s};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::runtime::{self, RuntimeError};
|
|||
use crate::status_cache::StatusCache;
|
||||
use bincode::serialize;
|
||||
use hashbrown::HashMap;
|
||||
use log::{debug, info, warn};
|
||||
use log::*;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::bpf_loader;
|
||||
|
|
|
@ -26,7 +26,6 @@ use crate::streamer::{BlobReceiver, BlobSender};
|
|||
use bincode::{deserialize, serialize};
|
||||
use core::cmp;
|
||||
use hashbrown::HashMap;
|
||||
use log::Level;
|
||||
use rand::{thread_rng, Rng};
|
||||
use rayon::prelude::*;
|
||||
use solana_metrics::counter::Counter;
|
||||
|
@ -642,7 +641,7 @@ impl ClusterInfo {
|
|||
.flat_map(|(b, vs)| {
|
||||
let blob = b.read().unwrap();
|
||||
|
||||
let ids_and_tvus = if log_enabled!(Level::Trace) {
|
||||
let ids_and_tvus = if log_enabled!(log::Level::Trace) {
|
||||
let v_ids = vs.iter().map(|v| v.id);
|
||||
let tvus = vs.iter().map(|v| v.tvu);
|
||||
let ids_and_tvus = v_ids.zip(tvus).collect();
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::result::{Error, Result};
|
|||
use crate::rpc_request::{RpcClient, RpcRequest, RpcRequestHandler};
|
||||
use bincode::serialize_into;
|
||||
use bs58;
|
||||
use log::Level;
|
||||
use serde_json;
|
||||
use solana_metrics;
|
||||
use solana_metrics::influxdb;
|
||||
|
@ -410,7 +409,7 @@ pub fn poll_gossip_for_leader(leader_gossip: SocketAddr, timeout: Option<u64>) -
|
|||
break;
|
||||
}
|
||||
|
||||
if log_enabled!(Level::Trace) {
|
||||
if log_enabled!(log::Level::Trace) {
|
||||
trace!("{}", cluster_info.read().unwrap().node_info_trace());
|
||||
}
|
||||
|
||||
|
@ -423,7 +422,7 @@ pub fn poll_gossip_for_leader(leader_gossip: SocketAddr, timeout: Option<u64>) -
|
|||
|
||||
gossip_service.close()?;
|
||||
|
||||
if log_enabled!(Level::Trace) {
|
||||
if log_enabled!(log::Level::Trace) {
|
||||
trace!("{}", cluster_info.read().unwrap().node_info_trace());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use bincode::serialized_size;
|
||||
use hashbrown::HashMap;
|
||||
use log::trace;
|
||||
use log::*;
|
||||
use rayon::prelude::*;
|
||||
use solana::cluster_info::NodeInfo;
|
||||
use solana::contact_info::ContactInfo;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#[macro_use]
|
||||
extern crate solana;
|
||||
|
||||
use log::trace;
|
||||
use log::*;
|
||||
use solana::bank_forks::BankForks;
|
||||
use solana::blocktree::{get_tmp_ledger_path, Blocktree};
|
||||
use solana::blocktree_processor::BankForksInfo;
|
||||
|
|
Loading…
Reference in New Issue