Crates.io | diskfire |
lib.rs | diskfire |
version | 0.1.0 |
source | src |
created_at | 2022-05-02 15:34:17.050212 |
updated_at | 2022-05-02 15:34:17.050212 |
description | NonBlocking, Blazing fast disk based logger |
homepage | https://github.com/Rustixir/darkbird |
repository | https://github.com/Rustixir/darkbird |
max_upload_size | |
id | 579176 |
size | 11,341 |
NonBlocking, Blazing fast disk based logger
fn main() {
let path = "loger";
let buffer_size = 10_000;
// Run
let (jh, sender) = FastLog::run(buffer_size, path);
// NonBlcoknig Log
let _ = sender.send(b"Record ....".to_vec());
// copy
let sender2 = sender.clone();
// NonBlocking send from another thread
std::thread::spawn(move || {
let _ = sender2.send(b"Record ....".to_vec());
});
let _ = jh.join();
}