main/main.rs
1use anyhow::Result;
2use black::BlackBox;
3
4fn main() -> Result<()> {
5 let logger = BlackBox::new("blackbox.log")?;
6
7 logger.log_event("Application started")?;
8
9 logger.log_error("Error: could not connect to the database")?;
10
11 logger.log_event("Data processing complete")?;
12
13 Ok(())
14}