| 77 | * A log sink that writes log events to multiple downstream sinks. |
| 78 | */ |
| 79 | export class CompositeSink implements LogSink { |
| 80 | readonly #downstream: LogSink[] |
| 81 | |
| 82 | constructor(...sinks: LogSink[]) { |
| 83 | this.#downstream = sinks |
| 84 | } |
| 85 | |
| 86 | write(event: LogEvent): void { |
| 87 | for (const sink of this.#downstream) { |
| 88 | sink.write(event) |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * A log sink that filters log events based on a given filter. |
nothing calls this directly
no outgoing calls
no test coverage detected