Crate satlog

source ·
Expand description

satlog.rs is a simple and minimalistic logger designed for SAT solvers and the likes, following the DIMACS syntax of comments starting with c.

The main interaction and setup is done through the SatLogger struct.

This plugs into the generic log crate and simply displays the messages to stdout.

Some neat features:

  • Messages with level [Level::Info] are displayed without prefix. This allows to show “default” logging messages and toggle them with the LevelFilter::Off.
  • Opt-out colors with the color feature.

Example

use satlog::SatLogger;
use log::LevelFilter;

fn main() {
    SatLogger::init(LevelFilter::Info);

    log::info!("Hello");
    log::trace!("Will not display");
}

Structs