next-with-linaria
Version:
Linaria support for Next.js App Router
31 lines (30 loc) • 878 B
TypeScript
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
interface LoggerOptions {
enableColors?: boolean;
minLevel?: LogLevel;
prefix?: string;
}
declare const COLORS: {
reset: string;
debug: string;
info: string;
warn: string;
error: string;
bold: string;
};
export declare class Logger {
private prefix;
private enableColors;
private minLevel;
constructor(options?: LoggerOptions);
private shouldLog;
private format;
debug(message: string, ...args: unknown[]): void;
info(message: string, ...args: unknown[]): void;
warn(message: string, ...args: unknown[]): void;
error(message: string, ...args: unknown[]): void;
colorize(message: string, color?: keyof typeof COLORS): string;
}
export declare const logger: Logger;
export declare function createLogger(options: LoggerOptions): Logger;
export {};