Expand description
logdrain — online log-template mining.
An independent Rust implementation of the Drain algorithm (He et al., 2017),
with the practical extensions Drain3 popularized (masking, persistence, numeric
parametrization). Feed log lines to a Miner and it clusters them into templates
online, returning a cluster id per line.
Modules§
- builtin_
masks - Built-in masks for common high-cardinality tokens.
Structs§
- AddResult
- Result of
Miner::add. - Cluster
- Immutable snapshot of a cluster, returned by miner query APIs.
- File
Persistence - File backend with crash-safe writes: data is written to a temporary sibling file, fsynced, then atomically renamed over the target.
- Mask
- A single pre-tokenization mask: a regex whose matches are replaced by a named placeholder.
- Memory
Persistence - In-memory backend. Useful for tests and ephemeral processes.
- Miner
- Thread-safe online log-template miner.
- Miner
Builder - Fluent builder for
Options/crate::Miner. - Options
- Resolved, validated miner configuration. Immutable for a miner’s lifetime.
- Owned
Token - Owned token stored inside a
crate::Cluster. - Token
- A borrowed token: a slice of the input line plus path-delimiter flags.
Enums§
- Logdrain
Error - Errors returned by
logdrain. v0.1 subset; persistence/regex variants land in later phases. - Persistence
Error - Error from a persistence backend.
- Update
Type - How an
addaffected the matched/created cluster.
Traits§
- Persistence
- A place to store and retrieve a serialized miner snapshot.
Type Aliases§
- Cluster
Id - Stable, process-unique identifier for a cluster.