wisdom-sdk
Version:
Core business logic and data access layer for prediction markets
26 lines (24 loc) • 907 B
TypeScript
interface Logger {
info: (obj: Record<string, unknown>, msg?: string) => void;
error: (obj: Record<string, unknown>, msg?: string) => void;
warn: (obj: Record<string, unknown>, msg?: string) => void;
debug: (obj: Record<string, unknown>, msg?: string) => void;
child: (bindings: object) => Logger;
}
declare const logger: Logger;
declare function getContextLogger(context: string): Logger;
declare class AppError extends Error {
readonly context: string;
readonly code: string;
readonly originalError?: Error;
readonly data?: Record<string, unknown>;
constructor({ message, context, code, originalError, data, }: {
message: string;
context?: string;
code?: string;
originalError?: Error;
data?: Record<string, unknown>;
});
log(): this;
}
export { AppError, type Logger, logger as default, getContextLogger, logger };