mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-25 13:15:02 +00:00
Init RuntimeLogger automatically for each runtime api call (#8128)
* Init `RuntimeLogger` automatically for each runtime api call This pr change the runtime api in such a way to always and automatically enable the `RuntimeLogger`. This enables the user to use `log` or `tracing` from inside the runtime to create log messages. As logging introduces some extra code and especially increases the size of the wasm blob. It is advised to disable all logging completely with `sp-api/disable-logging` when doing the wasm builds for the on-chain wasm runtime. Besides these changes, the pr also brings most of the logging found in frame to the same format "runtime::*". * Update frame/im-online/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Update test-utils/runtime/Cargo.toml * Fix test * Don't use tracing in the runtime, as we don't support it :D * Fixes Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
1 parent
f2d9bb9ea6
commit
68390d4085
65 files changed
+571
-422
No files matched your search
@@ -25,7 +25,7 @@
|
||||
|
||||
use sp_std::prelude::*;
|
||||
use frame_support::{
|
||||
construct_runtime, parameter_types, debug, RuntimeDebug,
|
||||
construct_runtime, parameter_types, RuntimeDebug,
|
||||
weights::{
|
||||
Weight, IdentityFee,
|
||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||
@@ -845,7 +845,7 @@ impl<LocalCall> frame_system::offchain::CreateSignedTransaction<LocalCall> for R
|
||||
);
|
||||
let raw_payload = SignedPayload::new(call, extra)
|
||||
.map_err(|e| {
|
||||
debug::warn!("Unable to create signed payload: {:?}", e);
|
||||
log::warn!("Unable to create signed payload: {:?}", e);
|
||||
})
|
||||
.ok()?;
|
||||
let signature = raw_payload
|
||||
|
||||
Reference in new issue
Block a user