import { ICommonTargetOptions, ILogEntry, ITargetsOption, Log, LogTarget } from "@spinajs/log-common"; /** * Options for {@link FallbackGroupTarget}. */ export interface IFallbackGroupTargetOptions extends ICommonTargetOptions { options: { /** * ORDERED inline child target definitions: the PRIMARY first, then one or * more fallbacks. Each is resolved through DI exactly like a top-level * target, so any registered target type ( File, Loki, another wrapper ... ) * can be nested here. */ targets: ITargetsOption[]; }; } /** * Failover wrapper: an ORDERED list of targets ( primary first, fallbacks * after ). It handles TWO complementary failure modes so a durable fallback * catches exactly what a down primary never delivered — with no duplicates: * * - **A ( immediate write rejection ).** `write()` tries the primary; if it * REJECTS ( see the contract on {@link LogTarget.write} ) it advances to the * next target, and so on, resolving on the first success. If every target * rejects the last rejection is swallowed ( warn-only ) so logging never * throws into the caller. * * - **D ( later async drop ).** Self-healing network targets ( Loki / OTLP ) * RESOLVE `write()` immediately and only later GIVE UP on an entry ( buffer * overflow or a non-retryable delivery failure ). resolve() wires each * target's {@link LogTarget.OnDropped} hook to the NEXT target's write, so * those late drops spill down the chain to the fallback. The last target has * no successor, so its OnDropped stays null. * * The inner targets are declared inline and owned by this wrapper ( resolve / * flush / dispose ). Pure / browser-safe - just delegates to its children. */ export declare class FallbackGroupTarget extends LogTarget { protected Log: Log; protected Inner: LogTarget[]; resolve(): void; write(entry: ILogEntry): Promise; forceFlush(): Promise; dispose(): Promise; } //# sourceMappingURL=FallbackGroupTarget.d.ts.map