# Simple Customizable Logging
### Features
- super simple
- dependency-free
- no_std support (but expects alloc crate)
- thread-safe
- panic-safe (crash-safe)
- fast
- covers most needs
- fully customizable
- flexibility (multiple handlers simultaneously, adjust level at runtime)
- macro-based
- automatic source location tracking (file:line)
- environment variable configuration (SCLOG_LEVEL, std only)
- chaining for Result and Option with LogUnwrap trait
### Usage:
```rust
use sclog::{LogLevel, hook_log_handler, log_info, LogUnwrap};
fn main() {
// 1. Hook your handler
hook_log_handler(|ll, f, ln, args| println!("{} ({}:{}): {}", ll.as_str().to_lowercase(), f, ln, args));
// 2. Log messages
log_info!("Server started on port {}", 8080);
// Output: [INFO] [main.rs:12] Server started on port 8080
// 3. Smart unwrapping with location-aware logging
let result: Result<i32, &str> = Err("database error");
let val = result.log_unwrap_or(0); // logs error at [main.rs:16] and returns 0
// 4. Panic/Abort with logging
log_abort!("Critical failure!");
}
```