# ribo
A collection of common utilities for Rust projects.
## Features
- **Logging**: Re-exports `tracing` and provides utility functions for initializing logging with a pre-configured format
- **I/O utilities**: Download and JSON utilities
- **Name utilities**: Codename generation functionality
## Logging
The logging utilities provide a pre-configured `tracing` setup with:
- Environment filter using `RUST_LOG` environment variable
- Target information included in logs
- File and line number information
- RFC3339 formatted timestamps in local time
- Colored output enabled by default
### Example Usage
```rust
use ribo::log::{self, tracing};
fn main() {
// Initialize logging with default configuration
log::init();
tracing::info!("This is an info message");
tracing::error!("This is an error message");
}
```
For more advanced configuration:
```rust
use ribo::log;
fn main() {
// Initialize with custom filter
log::init_with_filter("info", true); // Show info and above, with colors
// Or use the basic init
log::init();
}
```
The module re-exports `tracing`, so projects using `ribo` don't need to depend on `tracing` directly.