Skip to main content

Crate logdive_core

Crate logdive_core 

Source
Expand description

§logdive-core

Core library for logdive — structured JSON log parsing, SQLite-backed indexing, and a hand-written query engine.

This crate is pure library code with no I/O side effects at the module level. It is consumed by the logdive CLI binary and the logdive-api HTTP server binary.

Re-exports§

pub use entry::LogEntry;
pub use error::LogdiveError;
pub use error::Result;
pub use executor::execute;
pub use executor::execute_at;
pub use indexer::BATCH_SIZE;
pub use indexer::Indexer;
pub use indexer::InsertStats;
pub use indexer::Stats;
pub use indexer::db_path;
pub use parser::parse_line;
pub use query::Clause;
pub use query::CompareOp;
pub use query::Duration;
pub use query::DurationUnit;
pub use query::QueryNode;
pub use query::QueryParseError;
pub use query::QueryValue;
pub use query::parse as parse_query;

Modules§

entry
The LogEntry type — a single parsed log line.
error
Unified error type for logdive-core.
executor
Query executor: translate a QueryNode into parameterized SQL, run it against the index, and reconstruct LogEntry values from the result rows.
indexer
SQLite-backed index for ingested log entries.
parser
Line-by-line parser for structured JSON log input.
query
Query language: tokenizer, AST, and recursive descent parser.