UNPKG

855 BTypeScriptView Raw
1import type { ConsoleLevel } from '@sentry/types';
2export declare const CONSOLE_LEVELS: readonly ConsoleLevel[];
3type LoggerMethod = (...args: unknown[]) => void;
4type LoggerConsoleMethods = Record<ConsoleLevel, LoggerMethod>;
5/** This may be mutated by the console instrumentation. */
6export declare const originalConsoleMethods: {
7 [key in ConsoleLevel]?: (...args: any[]) => void;
8};
9/** JSDoc */
10interface Logger extends LoggerConsoleMethods {
11 disable(): void;
12 enable(): void;
13 isEnabled(): boolean;
14}
15/**
16 * Temporarily disable sentry console instrumentations.
17 *
18 * @param callback The function to run against the original `console` messages
19 * @returns The results of the callback
20 */
21export declare function consoleSandbox<T>(callback: () => T): T;
22export declare const logger: Logger;
23export {};
24//# sourceMappingURL=logger.d.ts.map
\No newline at end of file