contracts Add LOG_TARGET constant (#14002)

* contracts Add LOG_TARGET constant

* Update frame/contracts/src/lib.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

---------

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
This commit is contained in:
PG Herveou
2023-04-25 13:46:20 +02:00
committed by GitHub
parent bcf7601169
commit c11cb1b274
5 changed files with 21 additions and 14 deletions
@@ -19,7 +19,7 @@
use crate::{
storage::{ContractInfo, DepositAccount},
BalanceOf, Config, Error, Inspect, Pallet, System,
BalanceOf, Config, Error, Inspect, Pallet, System, LOG_TARGET,
};
use codec::Encode;
use frame_support::{
@@ -502,7 +502,7 @@ impl<T: Config> Ext<T> for ReservingExt {
);
if let Err(err) = result {
log::error!(
target: "runtime::contracts",
target: LOG_TARGET,
"Failed to transfer storage deposit {:?} from origin {:?} to deposit account {:?}: {:?}",
amount, origin, deposit_account, err,
);
@@ -531,7 +531,7 @@ impl<T: Config> Ext<T> for ReservingExt {
);
if matches!(result, Err(_)) {
log::error!(
target: "runtime::contracts",
target: LOG_TARGET,
"Failed to refund storage deposit {:?} from deposit account {:?} to origin {:?}: {:?}",
amount, deposit_account, origin, result,
);