#log-level #logging #configurable #applications #log-error #utility #env-var

syn_crabs

A lightweight and configurable logging library with color-coded output for Rust applications

2 unstable releases

0.2.0 Aug 24, 2024
0.1.0 Aug 19, 2024

#615 in Debugging

MIT/Apache

5KB

Syn_Crabs

syn_crabs is a lightweight and configurable logging utility for Rust applications, featuring color-coded log output.

Features

  • Color-coded log levels (ERROR, WARN, INFO, DEBUG, TRACE)
  • Configurable log levels via the RUST_LOG environment variable
  • Easy integration with any Rust application

Installation

Add syn_crabs to your Cargo.toml:

[dependencies]
syn_crabs = "0.1.0"

Usage

Setting Log Level:

RUST_LOG=debug cargo run

Implementing:

use logalicious_rs::setup_logging;

fn main() {
    setup_logging().expect("Failed to initialize logging");
    log::info!("This is an info message");
    log::error!("This is an error message");
}

Dependencies

~1.3–7.5MB
~56K SLoC