@holz/ansi-terminal-backend
Pretty-print logs to the terminal.
Usage
import { createAnsiTerminalBackend } from '@holz/ansi-terminal-backend';
const logger = createLogger(createAnsiTerminalBackend());
Note
There is no way to disable colors. The output relies on colors to convey structure. To disable colors, use a different backend such as@holz/stream-backend
.
Options
createAnsiTerminalBackend({
/**
* By default it prints to the global console, but you can override it.
* See: https://nodejs.org/api/console.html#new-consoleoptions
*/
console: new Console(custom.stdout, custom.stderr),
});