#log-line #log #parse #log-parser #log-format #log-messages #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

#5 in #log-line

Download history 220/week @ 2024-02-26 285/week @ 2024-03-04 222/week @ 2024-03-11 276/week @ 2024-03-18 380/week @ 2024-03-25 233/week @ 2024-04-01 207/week @ 2024-04-08 238/week @ 2024-04-15 181/week @ 2024-04-22 176/week @ 2024-04-29 38/week @ 2024-05-06 54/week @ 2024-05-13 76/week @ 2024-05-20 111/week @ 2024-05-27 159/week @ 2024-06-03 159/week @ 2024-06-10

507 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

~4–11MB
~94K SLoC