pub trait DebugRpc {
// Required methods
fn jemalloc_profiling_dump(&self) -> Result<String>;
fn update_main_logger(&self, config: MainLoggerConfig) -> Result<()>;
fn set_extra_logger(
&self,
name: String,
config_opt: Option<ExtraLoggerConfig>,
) -> Result<()>;
}
Expand description
RPC Module Debug for internal RPC methods.
This module is for CKB developers and will not guarantee compatibility. The methods here will be changed or removed without advanced notification.
Required Methods§
sourcefn jemalloc_profiling_dump(&self) -> Result<String>
fn jemalloc_profiling_dump(&self) -> Result<String>
Dumps jemalloc memory profiling information into a file.
The file is stored in the server running the CKB node.
The RPC returns the path to the dumped file on success or returns an error on failure.
sourcefn update_main_logger(&self, config: MainLoggerConfig) -> Result<()>
fn update_main_logger(&self, config: MainLoggerConfig) -> Result<()>
Changes main logger config options while CKB is running.
sourcefn set_extra_logger(
&self,
name: String,
config_opt: Option<ExtraLoggerConfig>,
) -> Result<()>
fn set_extra_logger( &self, name: String, config_opt: Option<ExtraLoggerConfig>, ) -> Result<()>
Sets logger config options for extra loggers.
CKB nodes allow setting up extra loggers. These loggers will have their own log files and they only append logs to their log files.
§Params
name
- Extra logger nameconfig_opt
- Adds a new logger or update an existing logger when this is not null. Removes the logger when this is null.