24 lines
563 B
TypeScript
24 lines
563 B
TypeScript
export type Breadcrumb = {
|
|
category: string;
|
|
message: string;
|
|
level?: "info" | "warning" | "error";
|
|
data?: Record<string, unknown>;
|
|
};
|
|
|
|
export type CaptureContext = {
|
|
tags?: Record<string, string>;
|
|
extras?: Record<string, unknown>;
|
|
fingerprint?: string[];
|
|
};
|
|
|
|
export interface ILogger {
|
|
captureException(err: unknown, ctx?: CaptureContext): void;
|
|
captureMessage(
|
|
msg: string,
|
|
level?: "info" | "warning" | "error",
|
|
ctx?: CaptureContext,
|
|
): void;
|
|
addBreadcrumb(b: Breadcrumb): void;
|
|
setUser(user: { id: string } | null): void;
|
|
}
|