sloggrs 0.1.0

Simple colored logger lib
Documentation
  • Coverage
  • 57.89%
    11 out of 19 items documented0 out of 3 items with examples
  • Size
  • Source code size: 5.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.56 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Woomymy/sloggrs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Woomymy

Sloggrs

Simple logging helper written in rust

Log levels

  • DEBUG: Debug information, (not needed in production)
  • INFO: Informations about progress (OK for production)
  • WARN: Warnings, nothing really dangerous but may be useful to find potential errors
  • ERROR: Recoverable errors
  • FATAL: Unrecoverable errors

Example

#[macro_use]
extern crate sloggrs;

fn main() {
    // Log only warnings and superior (enables WARN > ERROR > FATAL logs levels)
    init!(WARN);

    // Will **not** be logged
    debug!("Some really interesting debug message");

    // Will **not** be logged
    info!("Random information");

    // Will be logged
    warn!("Some information");

    // Will be logged
    error!("Failed to fail!")

    // Will be logged
    fatal!("Picards!");
}