1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-License-Identifier: Apache-2.0
//! Black-box recorder wiring for the WAL.
//!
//! The failures that matter most in a log — a hole in a segment, a missing
//! segment, a writer poisoned by a failed fsync — are *returned errors*, not
//! panics, so nothing installs a hook for them and they reach an operator as a
//! log line with no context. These entry points file a structured report at the
//! site that detected the failure, while the damaged bytes are still on disk.
//!
//! One report per root cause: a report is filed where the invariant is known
//! and nowhere else. Layers above add breadcrumbs and propagate the error —
//! emitting again on the way up would file several unrelated-looking reports
//! for a single failure, since each would carry its own fingerprint.
//!
//! This crate never calls `faultbox::init`. Choosing a reports directory and a
//! redactor belongs to the binary; everything here is inert until the host
//! application initializes the recorder, so a library emitting these costs
//! nothing on its own. The real implementation compiles only under the
//! `diagnostics` feature; otherwise every entry point is a no-op with the same
//! signature, so call sites never need a `cfg`.
pub use ;
pub use ;