pg-transactional-outbox
Version:
A PostgreSQL based transactional outbox and inbox pattern implementation to support exactly once message processing (with at least once message delivery).
20 lines • 710 B
TypeScript
import { BaseLogger } from 'pino';
export type TransactionalLogger = BaseLogger;
export declare const getDefaultLogger: (name?: string) => TransactionalLogger;
/**
* Disable the logger.
*/
export declare const getDisabledLogger: () => TransactionalLogger;
/**
* Writes all logs to an array that is returned from this call.
* @param context Add this to every log entry
* @returns The logger instance and the array of in-memory logs
*/
export declare const getInMemoryLogger: (context: string) => [logger: TransactionalLogger, logs: InMemoryLogEntry[]];
export interface InMemoryLogEntry {
context: string;
type: string;
date: string;
args: unknown[];
}
//# sourceMappingURL=logger.d.ts.map