CleverLib
A flexible Rust library for processing and analyzing log events with parallel and serial processing strategies.
Features
- Multiple event processing strategies
- Serial processing
- Parallel processing
- Efficient log event parsing
- Automatic log level detection
- Simple and intuitive API
Basic Usage
use EventCollection;
use File;
use ;
Parallel Processing
use EventCollection;
use File;
use ;
Performance Strategies
- Serial Processing:
create()
- Best for smaller log files - Parallel Processing:
create_par()
- Recommended for large log files
Key Methods
create(&lines)
: Process events seriallycreate_par(&lines)
: Process events in parallelfilter_log_level(level)
: Filter events by log levelfilter_log_level_par(level)
: Parallel log level filtering
Log Level Detection
The library automatically detects unique log levels during event processing. Detected levels are stored in event_collection.log_levels
.
Dependencies
- Requires Rayon for parallel processing
- Uses Regex for log parsing
Contributing
Contributions welcome! Please submit pull requests or open issues on the project repository.