Skip to content

Commit

Permalink
reduce info logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseditson committed May 4, 2024
1 parent f89fe5c commit ca88e62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use std::cmp::Ordering;
use std::collections::HashMap;
use std::error::Error;
use std::path::{Path, PathBuf};
use tracing::{debug, error, info};
use tracing::{debug, error};
#[cfg(feature = "binary")]
pub mod binary;
mod constants;
Expand Down Expand Up @@ -288,7 +288,7 @@ impl<F: FileSystemAPI> Archival<F> {
filename: &str,
obj_cb: impl FnOnce(&mut Object) -> Result<&mut Object, Box<dyn Error>>,
) -> Result<(), Box<dyn Error>> {
info!("write {}", filename);
debug!("write {}", filename);
let path = self.object_path(obj_type, filename);
let contents = self.modify_object_file(obj_type, filename, obj_cb)?;
self.fs_mutex.with_fs(|fs| fs.write_str(&path, contents))?;
Expand Down
12 changes: 6 additions & 6 deletions src/site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::{
path::{Path, PathBuf},
};
use thiserror::Error;
use tracing::{debug, error, info, instrument, trace_span, warn};
use tracing::{debug, error, instrument, trace_span, warn};

#[derive(Error, Debug, Clone)]
pub enum InvalidFileError {
Expand Down Expand Up @@ -90,7 +90,7 @@ impl Site {
}

// Load our object definitions
info!("loading definition {}", odf.display());
debug!("loading definition {}", odf.display());
let objects_table = read_toml(odf, fs)?;
let objects = ObjectDefinition::from_table(&objects_table)?;
Ok(Site {
Expand All @@ -117,7 +117,7 @@ impl Site {

#[instrument]
pub fn invalidate_file(&self, file: &Path) {
info!("invalidate {}", file.display());
debug!("invalidate {}", file.display());
self.obj_cache.borrow_mut().remove(file);
}

Expand Down Expand Up @@ -198,7 +198,7 @@ impl Site {
if let Some(o) = cache.get(path) {
Ok(o.clone())
} else {
info!("parsing {}", path.display());
debug!("parsing {}", path.display());
let obj_table = read_toml(path, fs)?;
let o = Object::from_table(
object_def,
Expand Down Expand Up @@ -307,7 +307,7 @@ impl Site {
}

// Render regular pages
info!("building pages in {}", pages_dir.display());
debug!("building pages in {}", pages_dir.display());
let template_pages: HashSet<&str> = self
.object_definitions
.values()
Expand All @@ -326,7 +326,7 @@ impl Site {
// template pages are not rendered as pages
continue;
}
info!(
debug!(
"rendering {} ({})",
file_path.display(),
page_type.extension()
Expand Down

0 comments on commit ca88e62

Please sign in to comment.