mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
explain debug details
This commit is contained in:
parent
2c6b523738
commit
a46c951e60
1 changed files with 7 additions and 4 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -143,24 +143,27 @@ async fn main() -> Result<()> {
|
||||||
.is_some_and(|limit| only_files.len() + 1 > limit)
|
.is_some_and(|limit| only_files.len() + 1 > limit)
|
||||||
{
|
{
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"file count limit reached, skip file #`{id}` for `{i}`"
|
"file count limit reached, skip file `{id}` for `{i}` at `{}`",
|
||||||
|
info.relative_filename.to_string_lossy()
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if preload.max_filesize.is_some_and(|limit| info.len > limit) {
|
if preload.max_filesize.is_some_and(|limit| info.len > limit) {
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"file size limit reached, skip file #`{id}` for `{i}`"
|
"file size limit reached, skip file `{id}` for `{i}` at `{}`",
|
||||||
|
info.relative_filename.to_string_lossy()
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if preload.regex.as_ref().is_some_and(|r| {
|
if preload.regex.as_ref().is_some_and(|r| {
|
||||||
!r.is_match(&info.relative_filename.to_string_lossy())
|
!r.is_match(&info.relative_filename.to_string_lossy())
|
||||||
}) {
|
}) {
|
||||||
log::debug!("regex filter, skip file #`{id}` for `{i}`");
|
log::debug!("regex filter, skip file `{id}` for `{i}` at `{}`",
|
||||||
|
info.relative_filename.to_string_lossy());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"keep file #`{id}` for `{i}` as `{}`",
|
"keep file `{id}` for `{i}` as `{}`",
|
||||||
info.relative_filename.to_string_lossy()
|
info.relative_filename.to_string_lossy()
|
||||||
);
|
);
|
||||||
assert!(keep_files.insert(info.relative_filename.clone()));
|
assert!(keep_files.insert(info.relative_filename.clone()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue