mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: rework logs (#2988)
This commit is contained in:
@ -277,19 +277,19 @@ impl RpcServerArgs {
|
||||
let server_config = self.rpc_server_config();
|
||||
let launch_rpc = rpc_modules.start_server(server_config).map_ok(|handle| {
|
||||
if let Some(url) = handle.ipc_endpoint() {
|
||||
info!(target: "reth::cli", url=%url, "IPC server started");
|
||||
info!(target: "reth::cli", url=%url, "RPC IPC server started");
|
||||
}
|
||||
if let Some(addr) = handle.http_local_addr() {
|
||||
info!(target: "reth::cli", url=%addr, "HTTP server started");
|
||||
info!(target: "reth::cli", url=%addr, "RPC HTTP server started");
|
||||
}
|
||||
if let Some(addr) = handle.ws_local_addr() {
|
||||
info!(target: "reth::cli", url=%addr, "WS server started");
|
||||
info!(target: "reth::cli", url=%addr, "RPC WS server started");
|
||||
}
|
||||
handle
|
||||
});
|
||||
|
||||
let launch_auth = auth_module.start_server(auth_config).inspect(|_| {
|
||||
info!(target: "reth::cli", "Started Auth server");
|
||||
info!(target: "reth::cli", "RPC auth server started");
|
||||
});
|
||||
|
||||
// launch servers concurrently
|
||||
|
||||
@ -108,7 +108,7 @@ pub struct Logs {
|
||||
journald: bool,
|
||||
|
||||
/// The filter to use for logs written to the log file.
|
||||
#[arg(long = "log.filter", value_name = "FILTER", global = true, default_value = "debug")]
|
||||
#[arg(long = "log.filter", value_name = "FILTER", global = true, default_value = "error")]
|
||||
filter: String,
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ impl Verbosity {
|
||||
_ => Level::TRACE,
|
||||
};
|
||||
|
||||
format!("reth::cli={level}").parse().unwrap()
|
||||
format!("{level}").parse().unwrap()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ impl<'a, DB: Database> DbTool<'a, DB> {
|
||||
/// Drops the database at the given path.
|
||||
pub fn drop(&mut self, path: impl AsRef<Path>) -> Result<()> {
|
||||
let path = path.as_ref();
|
||||
info!(target: "reth::cli", "Dropping db at {:?}", path);
|
||||
info!(target: "reth::cli", "Dropping database at {:?}", path);
|
||||
std::fs::remove_dir_all(path).wrap_err("Dropping the database failed")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user