I am getting this error on the block explorer "Extrinsics" tab the moment I add a debug related code into a Hello pallet into the node-template repo.
E.g:
#[pallet::call_index(0)]
#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]
pub fn say_hello(origin: OriginFor<T>) -> DispatchResult {
// Ensure that the caller is a regular keypair account
let who = ensure_signed(origin)?;
print("Hello world");
frame_support::log::info!("{:?} said hello", who);
// Emit an event
Self::deposit_event(Event::SomeoneSaysHello { who });
// Return a successful DispatchResult
Ok(())
}
After generating the runtime via $ cargo build --release
, I run the binary using $ RUST_LOG=runtime=debug ./target/release/node-template --dev
. And then I get this error.
Please note that I am not getting this error when there is no
debug
related code in the pallet. Also, when I am usingsp_runtime::print()
, it works fine, but not in case oflog::info
,log::debug
.
Any help would be really appreciated. Thanks!