Skip to content

Commit dc2b0eb

Browse files
authored
Merge pull request #1416 from opentensor/tune-down-logging
Tune down logging
2 parents 5d8c281 + a60153e commit dc2b0eb

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

pallets/subtensor/src/macros/dispatches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ mod dispatches {
966966
) -> DispatchResultWithPostInfo {
967967
// Ensure it's called with root privileges (scheduler has root privileges)
968968
ensure_root(origin)?;
969-
log::info!("swap_coldkey: {:?} -> {:?}", old_coldkey, new_coldkey);
969+
log::debug!("swap_coldkey: {:?} -> {:?}", old_coldkey, new_coldkey);
970970

971971
Self::do_swap_coldkey(&old_coldkey, &new_coldkey, swap_cost)
972972
}

pallets/subtensor/src/staking/move_stake.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<T: Config> Pallet<T> {
5151
)?;
5252

5353
// Log the event.
54-
log::info!(
54+
log::debug!(
5555
"StakeMoved( coldkey:{:?}, origin_hotkey:{:?}, origin_netuid:{:?}, destination_hotkey:{:?}, destination_netuid:{:?} )",
5656
coldkey.clone(),
5757
origin_hotkey.clone(),
@@ -133,7 +133,7 @@ impl<T: Config> Pallet<T> {
133133
)?;
134134

135135
// 9. Emit an event for logging/monitoring.
136-
log::info!(
136+
log::debug!(
137137
"StakeTransferred(origin_coldkey: {:?}, destination_coldkey: {:?}, hotkey: {:?}, origin_netuid: {:?}, destination_netuid: {:?}, amount: {:?})",
138138
coldkey,
139139
destination_coldkey,
@@ -203,7 +203,7 @@ impl<T: Config> Pallet<T> {
203203
)?;
204204

205205
// Emit an event for logging.
206-
log::info!(
206+
log::debug!(
207207
"StakeSwapped(coldkey: {:?}, hotkey: {:?}, origin_netuid: {:?}, destination_netuid: {:?}, amount: {:?})",
208208
coldkey,
209209
hotkey,
@@ -275,7 +275,7 @@ impl<T: Config> Pallet<T> {
275275
)?;
276276

277277
// Emit an event for logging.
278-
log::info!(
278+
log::debug!(
279279
"StakeSwapped(coldkey: {:?}, hotkey: {:?}, origin_netuid: {:?}, destination_netuid: {:?}, amount: {:?})",
280280
coldkey,
281281
hotkey,

pallets/subtensor/src/staking/remove_stake.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl<T: Config> Pallet<T> {
3939
) -> dispatch::DispatchResult {
4040
// 1. We check the transaction is signed by the caller and retrieve the T::AccountId coldkey information.
4141
let coldkey = ensure_signed(origin)?;
42-
log::info!(
42+
log::debug!(
4343
"do_remove_stake( origin:{:?} hotkey:{:?}, netuid: {:?}, alpha_unstaked:{:?} )",
4444
coldkey,
4545
hotkey,
@@ -117,7 +117,7 @@ impl<T: Config> Pallet<T> {
117117
) -> dispatch::DispatchResult {
118118
// 1. We check the transaction is signed by the caller and retrieve the T::AccountId coldkey information.
119119
let coldkey = ensure_signed(origin)?;
120-
log::info!("do_unstake_all( origin:{:?} hotkey:{:?} )", coldkey, hotkey);
120+
log::debug!("do_unstake_all( origin:{:?} hotkey:{:?} )", coldkey, hotkey);
121121

122122
// 2. Ensure that the hotkey account exists this is only possible through registration.
123123
ensure!(
@@ -191,7 +191,7 @@ impl<T: Config> Pallet<T> {
191191
) -> dispatch::DispatchResult {
192192
// 1. We check the transaction is signed by the caller and retrieve the T::AccountId coldkey information.
193193
let coldkey = ensure_signed(origin)?;
194-
log::info!("do_unstake_all( origin:{:?} hotkey:{:?} )", coldkey, hotkey);
194+
log::debug!("do_unstake_all( origin:{:?} hotkey:{:?} )", coldkey, hotkey);
195195

196196
// 2. Ensure that the hotkey account exists this is only possible through registration.
197197
ensure!(
@@ -294,7 +294,7 @@ impl<T: Config> Pallet<T> {
294294
) -> dispatch::DispatchResult {
295295
// 1. We check the transaction is signed by the caller and retrieve the T::AccountId coldkey information.
296296
let coldkey = ensure_signed(origin)?;
297-
log::info!(
297+
log::debug!(
298298
"do_remove_stake( origin:{:?} hotkey:{:?}, netuid: {:?}, alpha_unstaked:{:?} )",
299299
coldkey,
300300
hotkey,

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ impl<T: Config> Pallet<T> {
795795
actual_alpha_decrease,
796796
netuid,
797797
));
798-
log::info!(
798+
log::debug!(
799799
"StakeRemoved( coldkey: {:?}, hotkey:{:?}, tao: {:?}, alpha:{:?}, netuid: {:?} )",
800800
coldkey.clone(),
801801
hotkey.clone(),
@@ -858,7 +858,7 @@ impl<T: Config> Pallet<T> {
858858
actual_alpha,
859859
netuid,
860860
));
861-
log::info!(
861+
log::debug!(
862862
"StakeAdded( coldkey: {:?}, hotkey:{:?}, tao: {:?}, alpha:{:?}, netuid: {:?} )",
863863
coldkey.clone(),
864864
hotkey.clone(),

pallets/subtensor/src/subnets/registration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ impl<T: Config> Pallet<T> {
2020

2121
// Expand subnetwork with new account.
2222
Self::append_neuron(netuid, hotkey, block_number);
23-
log::info!("add new neuron account");
23+
log::debug!("add new neuron account");
2424
} else {
2525
// Replacement required.
2626
// We take the neuron with the lowest pruning score here.
2727
neuron_uid = Self::get_neuron_to_prune(netuid);
2828

2929
// Replace the neuron account with the new info.
3030
Self::replace_neuron(netuid, neuron_uid, hotkey, block_number);
31-
log::info!("prune neuron");
31+
log::debug!("prune neuron");
3232
}
3333

3434
// Return the UID of the neuron.

pallets/subtensor/src/utils/identity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl<T: Config> Pallet<T> {
135135
SubnetIdentitiesV2::<T>::insert(netuid, identity.clone());
136136

137137
// Log the identity set event
138-
log::info!("SubnetIdentitySet( netuid:{:?} ) ", netuid);
138+
log::debug!("SubnetIdentitySet( netuid:{:?} ) ", netuid);
139139

140140
// Emit an event to notify that an identity has been set
141141
Self::deposit_event(Event::SubnetIdentitySet(netuid));

precompiles/src/extensions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub(crate) trait PrecompileHandleExt: PrecompileHandle {
9191
);
9292
}
9393

94-
log::info!("Dispatch succeeded. Post info: {:?}", post_info);
94+
log::debug!("Dispatch succeeded. Post info: {:?}", post_info);
9595

9696
Ok(())
9797
}

0 commit comments

Comments
 (0)