s4lib/
lib.rs

1// src/lib.rs
2
3//! _Super Speedy Syslog Searcher_ library, _s4lib_!
4//!
5//! ## Introduction
6//!
7//! This is the library implementation used by binary program _s4_.
8//! This library is documented in part to have a presence on _docs.rs_.
9//!
10//! The _s4lib_ library was not designed for use outside of program _s4_,
11//! and it was not designed to be an especially user-friendly API.
12//!
13//! The term "syslog" within code context is used refers to a file
14//! where a text-encoded message has some parsesable datetimestamp. It includes
15//! but is not limited to an [RFC 5424] compliant message.
16//!
17//! The term "_log message_" is for any type of log message, including
18//! ad-hoc log messages, formal syslog RFC 5424 messages, fixedstruct entries
19//! (acct/lastlog/lastlogx/utmp/utmpx/wtmp/wtmpx), systemd journal messages,
20//! evtx entries, and other types of log messages.
21//!
22//! ## Overview of modules
23//!
24//! Broadly, there are definitions of data, under the [`data`] module, and
25//! there
26//! are Readers, under [`readers`] module. Note that the “Reader”s do not
27//! implement the Rust `Read` trait; it is merely a general phrase. These are
28//! where this tool's specific features are implemented.
29//! <br/>
30//! The [`printer`] module handles printing log messages to standard output,
31//! along with user-passed command-line printing options
32//! (e.g. `--color=always`, `--prepend-utc`, etc.).<br/>
33//! The [`debug`] module is for helper functions and features for debug builds
34//! and testing (it may not appear in these generated docs).<br/>
35//! The [`libload`] module is for loading shared
36//! libraries at runtime (e.g. `libsystemd.so` to parse journal files).<br/>
37//! The [`common`] module is for shared constants, definitions, and helper
38//! functions. There are also sub-module `common.rs` specific to that module,
39//! e.g. [`data/common.rs`].<br/>
40//! And finally the driver program is under the [`bin/s4.rs`].
41//!
42//! Also see [_Definitions of data_] and [`Sysline`].
43//!
44//! [RFC 5424]: https://www.rfc-editor.org/rfc/rfc5424.html
45//! [`bin/s4.rs`]: ../s4/index.html
46//! [`data/common.rs`]: crate::data::common
47//! [_Definitions of data_]: crate::data
48//! [`Sysline`]: crate::data::sysline::Sysline
49
50pub mod bindings;
51pub mod common;
52pub mod data;
53#[doc(hidden)]
54pub mod debug;
55pub mod libload;
56pub mod printer;
57pub mod readers;
58#[cfg(test)]
59pub mod tests;
60
61#[doc(hidden)]
62pub fn main() {}