neon_arch
commited on
Commit
β’
653d08c
1
Parent(s):
246d043
π§ chore: fix link in the logs & add logs for engine error (#170)
Browse files- src/bin/websurfx.rs +1 -1
- src/config/parser.rs +1 -1
- src/results/aggregator.rs +2 -0
src/bin/websurfx.rs
CHANGED
@@ -24,8 +24,8 @@ async fn main() -> std::io::Result<()> {
|
|
24 |
);
|
25 |
log::info!(
|
26 |
"Open http://{}:{}/ in your browser",
|
|
|
27 |
config.port,
|
28 |
-
config.binding_ip
|
29 |
);
|
30 |
|
31 |
let listener = TcpListener::bind((config.binding_ip.clone(), config.port))?;
|
|
|
24 |
);
|
25 |
log::info!(
|
26 |
"Open http://{}:{}/ in your browser",
|
27 |
+
config.binding_ip,
|
28 |
config.port,
|
|
|
29 |
);
|
30 |
|
31 |
let listener = TcpListener::bind((config.binding_ip.clone(), config.port))?;
|
src/config/parser.rs
CHANGED
@@ -98,7 +98,7 @@ impl Config {
|
|
98 |
let threads: u8 = if parsed_threads == 0 {
|
99 |
let total_num_of_threads: usize = available_parallelism()?.get() / 2;
|
100 |
log::error!("Config Error: The value of `threads` option should be a non zero positive integer");
|
101 |
-
log::
|
102 |
total_num_of_threads as u8
|
103 |
} else {
|
104 |
parsed_threads
|
|
|
98 |
let threads: u8 = if parsed_threads == 0 {
|
99 |
let total_num_of_threads: usize = available_parallelism()?.get() / 2;
|
100 |
log::error!("Config Error: The value of `threads` option should be a non zero positive integer");
|
101 |
+
log::error!("Falling back to using {} threads", total_num_of_threads);
|
102 |
total_num_of_threads as u8
|
103 |
} else {
|
104 |
parsed_threads
|
src/results/aggregator.rs
CHANGED
@@ -144,6 +144,7 @@ pub async fn aggregate(
|
|
144 |
initial = false
|
145 |
}
|
146 |
Err(error_type) => {
|
|
|
147 |
engine_errors_info.push(EngineErrorInfo::new(
|
148 |
error_type.downcast_ref::<EngineError>().unwrap(),
|
149 |
upstream_search_engines[counter].clone(),
|
@@ -172,6 +173,7 @@ pub async fn aggregate(
|
|
172 |
counter += 1
|
173 |
}
|
174 |
Err(error_type) => {
|
|
|
175 |
engine_errors_info.push(EngineErrorInfo::new(
|
176 |
error_type.downcast_ref::<EngineError>().unwrap(),
|
177 |
upstream_search_engines[counter].clone(),
|
|
|
144 |
initial = false
|
145 |
}
|
146 |
Err(error_type) => {
|
147 |
+
log::error!("Engine Error: {:?}", error_type);
|
148 |
engine_errors_info.push(EngineErrorInfo::new(
|
149 |
error_type.downcast_ref::<EngineError>().unwrap(),
|
150 |
upstream_search_engines[counter].clone(),
|
|
|
173 |
counter += 1
|
174 |
}
|
175 |
Err(error_type) => {
|
176 |
+
log::error!("Engine Error: {:?}", error_type);
|
177 |
engine_errors_info.push(EngineErrorInfo::new(
|
178 |
error_type.downcast_ref::<EngineError>().unwrap(),
|
179 |
upstream_search_engines[counter].clone(),
|