Skip to main content

appcore_log/
lib.rs

1// =============================================================================
2//        #######
3//     ###       ###     F: lib.rs
4//    ##   ## ##   ##    P: AppCore-Runtime
5//         ## ##
6//                       C: unknown by dnettoRaw
7//    ##   ## ##   ##    U: working-tree by dnettoRaw
8//      ###########      S: 1.0.2-rc
9// =============================================================================
10
11//! Safe structured operational logging for `AppCore`.
12//!
13//! Events are filtered before formatting, sanitized before every ordinary sink,
14//! and retained only under explicit count and byte limits. Severity describes
15//! impact; [`Verbosity`] describes detail and is independent of sensitivity.
16//! `Sensitive` policy output is accepted only by [`SensitiveDntSink`], which
17//! writes an authenticated encrypted `DNT` envelope and never falls back to text.
18
19#![deny(missing_docs)]
20
21mod clock;
22mod config;
23mod dispatcher;
24mod event;
25mod policy;
26mod sink;
27mod sizes;
28
29pub use clock::{FixedLogClock, LogClock, SystemLogClock};
30pub use config::{ConfiguredLogger, LogConfigError, LogOutputMode, LoggerConfig};
31pub use dispatcher::{LogBuilder, LogDispatcher, LogStats, SinkStats};
32pub use event::{
33    LogEvent, LogEventError, LogField, Severity, Verbosity, VerbosityError, MAX_LOG_FIELDS,
34    MAX_LOG_FIELD_KEY_BYTES, MAX_LOG_FIELD_VALUE_BYTES, MAX_LOG_TEXT_BYTES,
35};
36pub use policy::{LogPolicy, PathAliases, Sensitivity};
37pub use sink::{
38    ConsoleSink, FileArchiveConfig, FileSink, FileSinkConfig, LogError, LogSink, RingBufferSink,
39    SensitiveDntSink, SensitiveDntSinkConfig,
40};
41pub use sizes::{
42    LOG_SIZE_16_MIB, LOG_SIZE_1_MIB, LOG_SIZE_2_MIB, LOG_SIZE_32_MIB, LOG_SIZE_4_MIB,
43    LOG_SIZE_64_MIB, LOG_SIZE_8_MIB,
44};
45
46#[cfg(test)]
47mod tests;