lowercase debug messages

This commit is contained in:
yggverse 2025-08-08 16:34:51 +03:00
parent 7411a20a38
commit 2f091ad772
2 changed files with 9 additions and 9 deletions

View file

@ -70,12 +70,12 @@ async fn main() -> Result<()> {
}, },
) )
.await?; .await?;
log::info!("Crawler started on {time_init}"); log::info!("crawler started at {time_init}");
loop { loop {
let time_queue = Local::now(); let time_queue = Local::now();
log::debug!("Queue crawl begin on {time_queue}..."); log::debug!("queue crawl begin at {time_queue}...");
for source in &config.infohash { for source in &config.infohash {
log::debug!("Index source `{source}`..."); log::debug!("index source `{source}`...");
// grab latest info-hashes from this source // grab latest info-hashes from this source
// * aquatic server may update the stats at this moment, handle result manually // * aquatic server may update the stats at this moment, handle result manually
for i in match api::get(source, config.index_capacity) { for i in match api::get(source, config.index_capacity) {
@ -83,7 +83,7 @@ async fn main() -> Result<()> {
None => { None => {
// skip without panic // skip without panic
log::warn!( log::warn!(
"The feed `{source}` has an incomplete format (or is still updating); skip." "the feed `{source}` has an incomplete format (or is still updating); skip."
); );
continue; continue;
} }
@ -93,7 +93,7 @@ async fn main() -> Result<()> {
if preload.contains_torrent(&i)? { if preload.contains_torrent(&i)? {
continue; continue;
} }
log::debug!("Index `{i}`..."); log::debug!("index `{i}`...");
// run the crawler in single thread for performance reasons, // run the crawler in single thread for performance reasons,
// use `timeout` argument option to skip the dead connections. // use `timeout` argument option to skip the dead connections.
match time::timeout( match time::timeout(
@ -197,7 +197,7 @@ async fn main() -> Result<()> {
} }
} }
log::debug!( log::debug!(
"Queue completed at {time_queue} (time: {} / uptime: {}) await {} seconds to continue...", "queue completed at {time_queue} (time: {} / uptime: {}) await {} seconds to continue...",
Local::now() Local::now()
.signed_duration_since(time_queue) .signed_duration_since(time_queue)
.as_seconds_f32(), .as_seconds_f32(),

View file

@ -54,7 +54,7 @@ impl Preload {
// make sure preload path is referring to the expected location // make sure preload path is referring to the expected location
let o = p.canonicalize()?; let o = p.canonicalize()?;
if !o.starts_with(&self.root) || o.is_dir() { if !o.starts_with(&self.root) || o.is_dir() {
bail!("Unexpected canonical path `{}`", o.to_string_lossy()) bail!("unexpected canonical path `{}`", o.to_string_lossy())
} }
// build new permanent path /root/info-hash // build new permanent path /root/info-hash
let mut n = PathBuf::from(&d); let mut n = PathBuf::from(&d);
@ -64,7 +64,7 @@ impl Preload {
// make sure segments count is same to continue // make sure segments count is same to continue
if o.components().count() != n.components().count() { if o.components().count() != n.components().count() {
bail!( bail!(
"Unexpected components count: `{}` > `{}`", "unexpected components count: `{}` > `{}`",
o.to_string_lossy(), o.to_string_lossy(),
n.to_string_lossy(), n.to_string_lossy(),
) )
@ -100,7 +100,7 @@ impl Preload {
let mut p = PathBuf::from(&self.root); let mut p = PathBuf::from(&self.root);
p.push(tmp_component(info_hash)); p.push(tmp_component(info_hash));
if p.is_file() { if p.is_file() {
bail!("Output directory `{}` is file", p.to_string_lossy()) bail!("output directory `{}` is file", p.to_string_lossy())
} }
if is_create && !p.exists() { if is_create && !p.exists() {
fs::create_dir(&p)?; fs::create_dir(&p)?;