logparse 0.1.1

parse arbitrary messages containing rust-like debug output to syntax highlight them
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# Logparse

This crate makes a best-effort parsing for arbitrary text that may contain rust-like debug output.
This is intended for logs, that contain rust's debug output, and that you might want to highlight opposing parentheses, brackets, etc in.

Log messages, when parsed, can *always* be pretty printed back into their textual form perfectly.
The syntax tree unambiguously records any spaces in the source text.
There are tests that ensure this property for a very large number of inputs.

In addition, *any* log message can be parsed. `parse_input` returns a result,
but as far as I'm aware,
the parser is flexible enough to *never* reject,
and always falls back to categorizing text as *just* text.
There are also property tests to ensure this.