import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable'; import { TrackedError } from './TrackedError'; import { OperationDecoratorContext } from './OperationDecorator'; export type OperationLoggerContext = TContext & { logs: string[]; logMetadata?: Record; decoratorArgs?: OperationLoggerDecoratorArgs; sharedContext: OperationLoggerSharedContext; }; export interface OperationLoggerSharedContext { logs: string[]; logMetadata?: Record; } export interface OperationLoggerDecoratorArgs { shouldLog?: (ctx: OperationLoggerContext) => boolean | void; } export declare abstract class OperationLogger implements TryCatchFinallyHook { static getTryCatchFinallyHook(_ctx: OperationLoggerContext): TryCatchFinallyHook; abstract logInfo(msg: string, metadata?: object): void; abstract logError(msg: string, metadata?: object): void; onTry(ctx: OperationLoggerContext): () => void; onFinally(ctx: OperationLoggerContext): () => void; stageLog(ctx: OperationLoggerContext): () => void; shouldLogDefault(_ctx: OperationLoggerContext): boolean; getOperationLogMessages(ctx: OperationLoggerContext): string[]; getOperationTryMessage(ctx: OperationLoggerContext): string; getOperationName(ctx: TContext, fullPath?: boolean, separator?: string): string; getOperationCompletedMessage(ctx: OperationLoggerContext): string; getOperationErrorDetails(error: TrackedError, ctx: OperationLoggerContext): string[]; getErrorMessage(error: unknown, _ctx?: OperationLoggerContext): string; }