feat: log when report pages are logged, and when not

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-07-18 10:47:40 +03:00
parent 8d622c78ed
commit 3b882c43d0
+4
View File
@@ -494,6 +494,9 @@ impl StatusPage {
node_alias: &str,
once: bool,
) -> JoinHandle<Result<(), PageError>> {
if self.dirname.is_none() {
info!("not writing HTML report pages as output directory has not been set");
}
self.node_alias = node_alias.into();
spawn(move || loop {
self.update_and_write(&db)?;
@@ -506,6 +509,7 @@ impl StatusPage {
fn update_and_write(&mut self, db: &Db) -> Result<(), PageError> {
if let Some(dirname) = &self.dirname {
info!("write HTML report pages to {}", dirname.display());
let mut page = PageBuilder::default()
.node_alias(&self.node_alias)
.runs(db.get_all_runs()?)