use syslog::{Facility, Error};
      fn main() -> Result<(), Error> {
        syslog::init(Facility::LOG_USER,
          log::LevelFilter::Debug,
          Some("My app name"))?;
        log::debug!("this is a debug {}", "message");
        log::error!("this is an error!");
        Ok(())
      }
      
      Rust language logo

      Log to UNIX

      Codiga's Rust Recipes

      save log in Unix syslog

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.