UNPKG

@alwatr/logger

Version:

Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.

17 lines 665 B
import type { AlwatrLogger } from './type.js'; /** * Create a logger function for fancy console debug with custom scope. * * - `color` is optional and automatically selected from an internal list. * - `debug` is optional and automatically detected from `ALWATR_DEBUG` in localStorage or `process.env.DEBUG`. * * @example * ```ts * import {createLogger} from '@alwatr/logger'; * const logger = createLogger('my-module'); * * logger.logMethodArgs?.('myMethod', {a: 1}); // This line is ignored if debugMode is false. * ``` */ export declare function createLogger(name: string, forceDebugMode?: boolean): AlwatrLogger; //# sourceMappingURL=logger.d.ts.map