Crates.io | journald-parser |
lib.rs | journald-parser |
version | 0.1.0 |
source | src |
created_at | 2023-07-25 12:46:27.032265 |
updated_at | 2023-07-25 12:46:27.032265 |
description | A parser for the systemd journal format |
homepage | |
repository | https://github.com/nikola-milosa/journald-parser |
max_upload_size | |
id | 925543 |
size | 18,827 |
Welcome to the Rust Parser for systemd-journal-gatewayd Logs project! This is an open-source Rust library designed to parse and extract relevant information from logs gathered via systemd-journal-gatewayd. The parser aims to provide developers and system administrators an efficient way to handle and analyze logs from the gatewayd service. The systemd logs protocol can be found here
Please note that this parser is specifically tailored to work with logs generated by systemd-journal-gatewayd and may not be compatible with logs from other sources or services. In addition it is specifically created to parse Journal Export Format
.
To use the parser in your Rust code simply add it to your Cargo.toml
file as follows:
[dependencies]
journald_parser = "0.1.0"
The parser can be used as follows:
use journald_parser::parse;
fn main() {
let data_as_bytes: Vec<u8> = fetch_logs();
let batch = parse(data_as_bytes);
// Do something with the parsed logs
for entry in batch.get_entries() {
println!("Entry: {:#?}", entry);
}
}
fn fetch_logs() -> Vec<u8> {
// Fetch logs from systemd-journal-gatewayd
unimplemented!()
}