https://github.com/dfinity/journald-parser
Rust parser for systemd-journal-gatewayd logs in journal export format
https://github.com/dfinity/journald-parser
journald-parser rust systemd systemd-journal-gatewayd
Last synced: about 2 months ago
JSON representation
Rust parser for systemd-journal-gatewayd logs in journal export format
- Host: GitHub
- URL: https://github.com/dfinity/journald-parser
- Owner: dfinity
- License: apache-2.0
- Created: 2023-07-25T12:59:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-25T07:58:14.000Z (8 months ago)
- Last Synced: 2025-08-25T10:00:45.523Z (8 months ago)
- Topics: journald-parser, rust, systemd, systemd-journal-gatewayd
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Journald-parser
## Table of contents
* [Introduction](#introduction)
* [Features](#features)
* [Installation](#installation)
* [Usage](#usage)
## Introduction
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](https://systemd.io/JOURNAL_EXPORT_FORMATS/)
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`.
## Features
* Efficient Parsing: The parser is designed to efficiently process large log files to extract valuable information while keeping resource usage in check.
* Structured Data: The parsed logs are transformed into structured data formats, allowing for easy manipulation and analysis.
* Error Handling: The parser implements robust error handling to gracefully handle malformed or unexpected log entries.
## Installation
To use the parser in your Rust code simply add it to your `Cargo.toml` file as follows:
```toml
[dependencies]
journald_parser = "0.1.0"
```
## Usage
The parser can be used as follows:
```rust
use journald_parser::parse;
fn main() {
let data_as_bytes: Vec = 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 {
// Fetch logs from systemd-journal-gatewayd
unimplemented!()
}
```