mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-22 14:08:23 -05:00
🔧 chore: fix link in the logs & add logs for engine error (#170)
This commit is contained in:
parent
246d043e4a
commit
653d08c801
@ -24,8 +24,8 @@ async fn main() -> std::io::Result<()> {
|
|||||||
);
|
);
|
||||||
log::info!(
|
log::info!(
|
||||||
"Open http://{}:{}/ in your browser",
|
"Open http://{}:{}/ in your browser",
|
||||||
|
config.binding_ip,
|
||||||
config.port,
|
config.port,
|
||||||
config.binding_ip
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let listener = TcpListener::bind((config.binding_ip.clone(), config.port))?;
|
let listener = TcpListener::bind((config.binding_ip.clone(), config.port))?;
|
||||||
|
@ -98,7 +98,7 @@ impl Config {
|
|||||||
let threads: u8 = if parsed_threads == 0 {
|
let threads: u8 = if parsed_threads == 0 {
|
||||||
let total_num_of_threads: usize = available_parallelism()?.get() / 2;
|
let total_num_of_threads: usize = available_parallelism()?.get() / 2;
|
||||||
log::error!("Config Error: The value of `threads` option should be a non zero positive integer");
|
log::error!("Config Error: The value of `threads` option should be a non zero positive integer");
|
||||||
log::info!("Falling back to using {} threads", total_num_of_threads);
|
log::error!("Falling back to using {} threads", total_num_of_threads);
|
||||||
total_num_of_threads as u8
|
total_num_of_threads as u8
|
||||||
} else {
|
} else {
|
||||||
parsed_threads
|
parsed_threads
|
||||||
|
@ -144,6 +144,7 @@ pub async fn aggregate(
|
|||||||
initial = false
|
initial = false
|
||||||
}
|
}
|
||||||
Err(error_type) => {
|
Err(error_type) => {
|
||||||
|
log::error!("Engine Error: {:?}", error_type);
|
||||||
engine_errors_info.push(EngineErrorInfo::new(
|
engine_errors_info.push(EngineErrorInfo::new(
|
||||||
error_type.downcast_ref::<EngineError>().unwrap(),
|
error_type.downcast_ref::<EngineError>().unwrap(),
|
||||||
upstream_search_engines[counter].clone(),
|
upstream_search_engines[counter].clone(),
|
||||||
@ -172,6 +173,7 @@ pub async fn aggregate(
|
|||||||
counter += 1
|
counter += 1
|
||||||
}
|
}
|
||||||
Err(error_type) => {
|
Err(error_type) => {
|
||||||
|
log::error!("Engine Error: {:?}", error_type);
|
||||||
engine_errors_info.push(EngineErrorInfo::new(
|
engine_errors_info.push(EngineErrorInfo::new(
|
||||||
error_type.downcast_ref::<EngineError>().unwrap(),
|
error_type.downcast_ref::<EngineError>().unwrap(),
|
||||||
upstream_search_engines[counter].clone(),
|
upstream_search_engines[counter].clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user