slogger
A simple, colorful logging library for Rust applications with built-in ANSI terminal colors and formatted output.
Features
- Colored log levels (DEBUG, INFO, WARN, ERROR)
- Timestamp in ISO 8601 format
- File and line number information
- Thread ID tracking
- Built-in ANSI color constants
- Easy-to-use macros for logging and color manipulation
Installation
Add this to your Cargo.toml:
[]
= "0.1.2"
Usage
use ;
Each log message includes:
- Timestamp in ISO 8601 format
- Log level with color
- Source file and line number
- Thread ID
- Your message in the corresponding level color
Color Utilities
The library also provides direct access to ANSI color codes and formatting:
use ;
use ;
use ;
println!;
License
MIT License