Log Watcher
A Rust library to watch the log files.
Note: Tested only in Linux
Features:
- Automatically reloads log file when log rotated
- Calls callback function when new line to parse
Usage
First, add the following to your Cargo.toml
[]
= "0.1"
Add to your code,
extern crate logwatcher;
use LogWatcher;
Register the logwatcher, pass a closure and watch it!
let mut log_watcher = register.unwrap;
log_watcher.watch;