#log-line #log-parser #log-format #log #parse #single-line #timestamp

anylog

A library for Rust that attempts to parse single log lines into records

12 releases

0.6.4 Mar 30, 2023
0.6.3 Nov 10, 2022
0.6.2 Sep 28, 2022
0.6.1 Jan 5, 2021
0.2.0 Nov 20, 2017

#632 in Parser implementations

Download history 167/week @ 2024-07-27 99/week @ 2024-08-03 35/week @ 2024-08-10 118/week @ 2024-08-17 113/week @ 2024-08-24 288/week @ 2024-08-31 136/week @ 2024-09-07 198/week @ 2024-09-14 224/week @ 2024-09-21 247/week @ 2024-09-28 188/week @ 2024-10-05 86/week @ 2024-10-12 84/week @ 2024-10-19 72/week @ 2024-10-26 133/week @ 2024-11-02 97/week @ 2024-11-09

396 downloads per month
Used in 2 crates (via symbolic-unreal)

BSD-3-Clause

29KB
852 lines

rust-anylog

A simple rust library that parses log lines into log records. This supports a range of common log formats and parses out the timestamp and rest of the line.

Documentation

Tests

Tests require the timezone to be set to "CEST". The easiest way to do this is by exporting the TZ environment variable:

TZ=CET cargo test

lib.rs:

anylog is a crate that tries to parse any potential log message it would encounter and extract timestamp and message from it. It supports a wide range of formats and tries them all.

This crate is used by Sentry to parse logfiles into breadcrumbs.

Dependencies

~3.5–10MB
~93K SLoC