@holz/console-backend
Version:
A console backend for Holz
23 lines (18 loc) • 671 B
TypeScript
import { LogProcessor } from '@holz/core';
/**
* A backend that pretty-prints logs to a browser console, or any
* remote-attached console.
*/
export declare const createConsoleBackend: (options?: Options) => LogProcessor;
/**
* A subset of the Console interface. Must support printf-style interpolation.
* @see https://console.spec.whatwg.org/#formatting-specifiers
*
* Note that `fatal` has no corresponding equivalent. It will be downgraded to
* `error` when printed.
*/
declare type MinimalConsole = Pick<Console, 'trace' | 'debug' | 'info' | 'warn' | 'error'>;
declare interface Options {
console?: MinimalConsole;
}
export { }