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
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 Dante Doménech Martinez dante19031999@gmail.com
use crateMessage;
use crateServiceError;
use ;
/// A strategy for handling log delivery failures.
///
/// The `Fallback` trait defines how the system should react when a log service
/// is unable to process a [message][`Message`] after exhausting all retry attempts.
///
/// ### Use Cases
/// - **Local Logging**: Writing failed logs to `stdout`, `stderr`, or a local file.
/// - **Alerting**: Triggering a secondary notification system if critical logs are lost.
/// - **Buffering**: Storing failed [messages][`Message`] in a persistent queue for later recovery.
///
/// ### Thread Safety
/// Since the worker thread calls this trait's method, implementations must be
/// thread-safe if they involve shared state.