sheen ✨
A polished, colorful logging library for Rust ✨

Features
- Colorful, human-readable output
- Structured key=value logging
- Multiple formatters: Text, JSON, Logfmt
- Sub-loggers with persistent fields
- TTY detection (auto-disables colors when piped)
- Builder pattern configuration
- Zero config defaults
Installation
[]
= "0.2"
Quick Start
Output:
14:32:15 INFO Server started port=3000
14:32:15 WARN Cache miss key="user_123"
14:32:15 ERROR Connection failed attempts=3
Custom Configuration
use ;
Sub-loggers
Create loggers with persistent fields using .with():
use ;
let logger = new.level;
let req_log = logger.with;
req_log.info;
req_log.info;
req_log.info;
Output:
14:32:15 INFO started request_id="abc123"
14:32:15 INFO db query request_id="abc123" table="users"
14:32:15 INFO completed request_id="abc123" status=200
Formatters
Text (default)
Colorful, human-readable output:
let logger = new;
logger.info;
// 14:32:15 INFO hello port=3000
JSON
Structured output for log aggregators:
use ;
let logger = new.formatter;
logger.info;
// {"level":"info","msg":"hello","time":"14:32:15","port":3000}
Logfmt
Key=value format for Heroku, Splunk, etc:
use ;
let logger = new.formatter;
logger.info;
// level=info msg="hello" time="14:32:15" port=3000
TTY Detection
Colors are automatically disabled when output is piped:
# Colors enabled
# Colors disabled (piped to file)
Force colors on or off:
let logger = new.colorize;
License
MIT