pub fn log_initialization(log_file: &mut File, date: &str) -> Result<()>Expand description
Records system initialisation in the logging system.
Creates a detailed log entry capturing the system’s startup state, including configuration and initial conditions. Uses the Common Log Format (CLF) for consistent logging.
§Arguments
log_file- Active file handle for writing log entriesdate- Current date and time for log timestamps
§Returns
Ok(())- If the log entry is written successfullyErr- If writing fails or translation errors occur
§Examples
use ssg::{create_log_file, log_initialization};
fn main() -> anyhow::Result<()> {
let mut log_file = create_log_file("./site.log")?;
let date = ssg::now_iso();
log_initialization(&mut log_file, &date)?;
println!("System initialisation logged");
Ok(())
}