sl4f_lib/logging/
facade.rs1use anyhow::Error;
6use log::*;
7
8#[derive(Debug)]
13pub struct LoggingFacade {}
14
15impl LoggingFacade {
16 pub fn new() -> LoggingFacade {
17 LoggingFacade {}
18 }
19
20 pub async fn log_err(&self, message: String) -> Result<(), Error> {
21 error!("{:?}", message);
22 Ok(())
23 }
24
25 pub async fn log_info(&self, message: String) -> Result<(), Error> {
26 info!("{:?}", message);
27 Ok(())
28 }
29
30 pub async fn log_warn(&self, message: String) -> Result<(), Error> {
31 warn!("{:?}", message);
32 Ok(())
33 }
34}