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
+3 -3
View File
@@ -19,7 +19,7 @@ use crate::{
gas::GasMeter,
storage::{self, DepositAccount, WriteOutcome},
BalanceOf, CodeHash, Config, ContractInfo, ContractInfoOf, DebugBufferVec, Determinism, Error,
Event, Nonce, Pallet as Contracts, Schedule, System,
Event, Nonce, Pallet as Contracts, Schedule, System, LOG_TARGET,
};
use frame_support::{
crypto::ecdsa::ECDSAExt,
@@ -1002,7 +1002,7 @@ where
} else {
if let Some((msg, false)) = self.debug_message.as_ref().map(|m| (m, m.is_empty())) {
log::debug!(
target: "runtime::contracts",
target: LOG_TARGET,
"Execution finished with debug buffer: {}",
core::str::from_utf8(msg).unwrap_or("<Invalid UTF8>"),
);
@@ -1331,7 +1331,7 @@ where
.try_extend(&mut msg.bytes())
.map_err(|_| {
log::debug!(
target: "runtime::contracts",
target: LOG_TARGET,
"Debug buffer (of {} bytes) exhausted!",
DebugBufferVec::<T>::bound(),
)