Validator log filter may now be reconfigured at runtime (#5473)
* Log filter may now be reconfigured at runtime * Add RPC API and bash script to reconfigure the log filter
This commit is contained in:
@ -328,6 +328,9 @@ pub trait RpcSol {
|
||||
|
||||
#[rpc(meta, name = "getVersion")]
|
||||
fn get_version(&self, _: Self::Metadata) -> Result<RpcVersionInfo>;
|
||||
|
||||
#[rpc(meta, name = "setLogFilter")]
|
||||
fn set_log_filter(&self, _: Self::Metadata, _: String) -> Result<()>;
|
||||
}
|
||||
|
||||
pub struct RpcSolImpl;
|
||||
@ -619,6 +622,11 @@ impl RpcSol for RpcSolImpl {
|
||||
solana_core: VERSION.to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
fn set_log_filter(&self, _: Self::Metadata, filter: String) -> Result<()> {
|
||||
solana_logger::setup_with_filter(&filter);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Reference in New Issue
Block a user