Log Parse

v0.1.0Added Sep 26, 2026Sample data

Parses syslog (RFC 3164 / 5424) and common web server access logs into structured records.

Sample data. These figures are placeholders, not measurements.

cargo install kura-rs
kura add log-parse

Copies 3 source files into your project. You own the code from then on.

If another tool already installs a kura command, run cargo install kura-rs --bin kura-rs and use kura-rs add instead.

use crate::parts::log_parse::{parse_line, Format};

for line in reader.lines() {
    let record = parse_line(Format::Rfc5424, &line?)?;
    println!("{} {}", record.host, record.message);
}

Verification

Sample data

Checked against re 3.12 (Python) using golden files: the same inputs go to both implementations and the outputs are compared.

Reference
re
Python 3.12
Test cases
1,200
Golden files
Passed
1,200 / 1,200
All cases match
Last run
Sep 26, 2026
UTC

These numbers are placeholders. They have not been measured yet and must not be read as real results. This part is marked "sample": true in its registry file.

Benchmarks

Sample data

kura-rs (Rust) against re across input sizes. Faster at every measured input size, up to 20× faster.

These numbers are placeholders. They have not been measured yet and must not be read as real results. This part is marked "sample": true in its registry file.

kura-rs (Rust)re
Wall time per run (lower is better).
Show data table
Input sizekura-rs (Rust)reSpeedup
1000.03 ms0.4 ms13×
1,0000.21 ms3.9 ms19×
10,0002 ms39 ms20×
100,00020 ms395 ms20×
1,000,000196 ms3.96 s20×

Files

  • parts/log_parse/mod.rs
  • parts/log_parse/syslog.rs
  • parts/log_parse/access.rs

Crate dependencies